YesNoOk
avatar

DestroySelf (SCTRLs) 1.0 + 1.1b (Read 2948 times)

Started by Ricepigeon, October 19, 2015, 03:34:26 pm
Share this topic:
DestroySelf (SCTRLs) 1.0 + 1.1b
#1  October 19, 2015, 03:34:26 pm
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
    • ricepigeon.neocities.org
If called by a helper-type character, DestroySelf causes that character to be removed from the field of play. DestroySelf is not valid for non-helper characters.

Required parameters:
    none

Optional parameters:
    none

Example:
    none

Additional Notes:
There currently exists a small bug in the DestroySelf SCTRL that, when called by a helper that has a target, usually a helper-based projectile that hit the opponent, if the helper calls DestroySelf before the player or another helper can hit the opponent, the combo counter that is displayed on M.U.G.E.N will reset to 0. This does not affect damage scaling systems in any way, but does look awkward. In these cases it is usually best to have the helper be sent to an invisible, inactive state instead, and then call DestroySelf when the helper no longer has a target (using the NumTarget trigger). When a helper has a target, and the player or another helper hits that same opponent, this causes the helper to lose its target while the player/other helper gains that opponent as a target, so the helper can safely call DestroySelf without resetting the combo counter.

In 1.0 there is an instability if explods are not removed before DestroySelf.

1.1b Exclusive
Optional parameters:

recursive = recursive_flag (int)
If 1, all helper descendents of this helper will also be destroyed. Defaults to 0.

removeexplods = remove_explods (int)
If 1, all explods belonging to the helper will also be removed. If recursive_flag is 1, explods belonging to descendents of the helper will also be removed. Defaults to 0.

Notes:
Any players or explods bound to the helper will be forcefully unbound when DestroySelf is executed.

Any unremoved explods belonging to a destroyed helper will become orphaned.
Last Edit: October 28, 2015, 02:41:51 pm by Just No Point
Re: DestroySelf (SCTRLs) 1.0 + 1.1b
#2  October 27, 2015, 09:35:25 pm
  • ******
    • www.justnopoint.com/
Added 1.1b documentation
Re: DestroySelf (SCTRLs) 1.0 + 1.1b
#3  February 13, 2016, 08:52:43 am
  • *****
  • Shame on you!
    • USA
One useful chunk of code to stop clones is,

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 5 && ishelper
trigger2 = animelem = 3 && ishelper
ignorehitpause = 1

Basically, If the helper ever goes to state 0, it destroys itself. I put this in all of my characters' statedef 0 now. I dont have a helper that can go into statedef 0 by my code.
There are reasons to send a character's helper into statedef 0. Some complex ultras/specials can set P2 to spawn a helper. The helper could be set to statedef 0 to then be hit so it's a particular target under P1's control. This would happen near instantly.
 This is why it doesnt kill itself until time = 5 or animelem = 3. If the code was set to kill the helper entering statedef 0 instantly, those special effects wouldnt happen and possibly break the characters' moves. You probably dont need both checks but there may be a particular instance where time = 5 is ignored.

vVv Wheat Stage Released vVv
Re: DestroySelf (SCTRLs) 1.0 + 1.1b
#4  February 13, 2016, 09:00:07 am
  • ****
  • play more SNK games
  • I FUCKING LOVE PLATINUM!
    • South Africa
    • www.trinitymugen.net/
Tbh, that sounds like a fix for shodding coding
Re: DestroySelf (SCTRLs) 1.0 + 1.1b
#5  February 16, 2016, 02:22:46 am
  • *****
  • Shame on you!
    • USA
Yeah it happens when you fight characters that do hitoverrides and the like.
If you fight a random character that would mess up your character, this will fix it.
vVv Wheat Stage Released vVv