YesNoOk
avatar

TargetDrop (SCTRL) (Read 18140 times)

Started by JustNoPoint, October 31, 2015, 02:17:56 pm
Share this topic:
TargetDrop (SCTRL)
#1  October 31, 2015, 02:17:56 pm
  • ******
    • www.justnopoint.com/
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)
TargetBind (SCTRL) 
TargetFacing (SCTRL)
TargetLifeAdd (SCTRL)
TargetPowerAdd (SCTRL)
TargetState (SCTRL)
TargetVelAdd (SCTRL)
TargetVelSet (SCTRL)

Related Triggers:
NumTarget (Triggers)
Last Edit: November 25, 2015, 05:20:57 am by Odb718
Re: TargetDrop (SCTRL)
#2  April 15, 2016, 09:27:29 pm
  • *****
  • Thanks and God bless
    • USA
    • ricepigeon.neocities.org
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?
Re: TargetDrop (SCTRL)
#3  April 16, 2016, 04:14:02 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
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.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: TargetDrop (SCTRL)
#4  December 21, 2017, 07:28:05 pm
  • ****
  • Vs Style Debuts Tag Project CEO
  • The Dark Wolf Returns
    • USA
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.
Beware the Dark Wolf once more!
Re: TargetDrop (SCTRL)
#5  December 21, 2017, 09:49:12 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
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.

Re: TargetDrop (SCTRL)
#6  February 21, 2018, 01:45:07 am
  • *****
  • Thanks and God bless
    • USA
    • ricepigeon.neocities.org
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?
Re: TargetDrop (SCTRL)
#7  February 21, 2018, 03:17:03 pm
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
target,ishelper??
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: TargetDrop (SCTRL)
New #8  February 22, 2018, 01:05:48 am
  • *****
  • Thanks and God bless
    • USA
    • ricepigeon.neocities.org
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
Last Edit: February 22, 2018, 01:40:22 am by Ricepigeon