The Mugen Fighters Guild

Help => M.U.G.E.N Development Help => MUGEN Class => Topic started by: JustNoPoint on October 31, 2015, 02:17:56 pm

Title: TargetDrop (SCTRL)
Post by: JustNoPoint on October 31, 2015, 02:17:56 pm
Drops all targets from the player's target list, except possibly for those having a specified target ID number. Useful for applying effects to only certain targets.

Required parameters:
none

Optional parameters:
excludeID = id_no (int)
Any targets with target ID number not equal to id_no will be dropped from the player's target list. Defaults to -1 (drop all targets).

keepone = keep_flag (boolean)
If keep_flag is non-zero, then at most one target is kept on the player's target list. If there are multiple targets whose target ID number is the same as id_no, one will be picked at random and the rest will be dropped. This behavior is useful in throws, to keep from throwing multiple opponents simultaneously. If keep_flag is 0, then all targets with the appropriate ID number will be kept. keep_flag defaults to 1.

Example:
Code:
;Fighter Factory 3
 [State 0, TargetDrop]
type = TargetDrop
trigger1 =
excludeID = -1
keepone = 1
;ignorehitpause =
;persistent =

Related SCTRL:
BindToTarget (SCTRL) (http://mugenguild.com/forum/topics/bindtotarget-sctrl-170088.0.html)
TargetBind (SCTRL) (http://mugenguild.com/forum/topics/targetbind-sctrl-170204.0.html) 
TargetFacing (SCTRL) (http://mugenguild.com/forum/topics/targetfacing-sctrl-170206.0.html)
TargetLifeAdd (SCTRL) (http://mugenguild.com/forum/topics/targetlifeadd-sctrl-169891.0.html)
TargetPowerAdd (SCTRL) (http://mugenguild.com/forum/topics/targetpoweradd-sctrl-169929.0.html)
TargetState (SCTRL) (http://mugenguild.com/forum/topics/targetstate-sctrl-169309.0.html)
TargetVelAdd (SCTRL) (http://mugenguild.com/forum/topics/targetveladd-sctrl-170207.0.html)
TargetVelSet (SCTRL) (http://mugenguild.com/forum/topics/targetvelset-sctrl-170208.0.html)

Related Triggers:
NumTarget (Triggers) (http://mugenguild.com/forum/topics/numtarget-triggers-169464.0.html)
Title: Re: TargetDrop (SCTRL)
Post by: Ricepigeon on April 15, 2016, 09:27:29 pm
Looking over this controller, does it even have any practical uses? The only possible use I could see it in are throws to force the player to throw only one target, but most throw hitdefs can only hit one target anyway, so what practical applications does this have?
Title: Re: TargetDrop (SCTRL)
Post by: Cyanide on April 16, 2016, 04:14:02 am
I have had to use it where it is possible to combo into a throw of some sort and you use a variety of juggle code or dampener etc that keeps movecontact active to work. When you enter the throw targetbind is used, but it breaks if it also relies on the movehit, so you need to drop target when the state begins.

Also had to use it in omega red around the cables but i sure as fuck can't remember why.
Title: Re: TargetDrop (SCTRL)
Post by: DarkWolf13 on December 21, 2017, 07:28:05 pm
is this useful for tag systems? Like if a partner was hit and for some odd reason, they return back to their standby positions offscreen the very second they grab someone for a throw and the target is stuck in the throw state despite the fighter not being in the state where they're supposed to throw them.
Title: Re: TargetDrop (SCTRL)
Post by: altoiddealer on December 21, 2017, 09:49:12 pm
is this useful for tag systems? Like if a partner was hit and for some odd reason, they return back to their standby positions offscreen the very second they grab someone for a throw and the target is stuck in the throw state despite the fighter not being in the state where they're supposed to throw them.
In your example scenario, the enemy being thrown would be put in a custom state.
All custom states should have a SelfState controller to return the enemy to their own states, for situations like this.

Also when the character is whisked away to a standby state, they would no longer be in an Attack statetype so their targets would drop anyway.
Title: Re: TargetDrop (SCTRL)
Post by: Ricepigeon on February 21, 2018, 01:45:07 am
So took a look at this again, and the docs state that if there are multiple targets with the same targetid, that one will be dropped at random if keepone is set to true. Is there any way to ensure control over this in case of, say, a helper-based projectile hits both a player and another helper simultaneously, but you want the hitdef to reset if and only if it hits a helper so that it doesn't hit the non-helper opponent multiple times?
Title: Re: TargetDrop (SCTRL)
Post by: XGargoyle on February 21, 2018, 03:17:03 pm
target,ishelper??
Title: Re: TargetDrop (SCTRL)
Post by: Ricepigeon on February 22, 2018, 01:05:48 am
Wouldn't that only check the first available target, so that its not guaranteed? Or, would the processing order of targets take the playerID into account? (as in, it checks any non-helper targets before ever reaching helper targets?)

EDIT: Just tested a scenario where it hit both a helper and non-helper simultaneously and target,ishelper returned true