YesNoOk
avatar

TargetState (SCTRL) (Read 12122 times)

Started by Ricepigeon, September 23, 2015, 04:07:33 pm
Share this topic:
TargetState (SCTRL)
#1  September 23, 2015, 04:07:33 pm
  • *****
  • Thanks and God bless
    • USA
    • ricepigeon.neocities.org
Makes all targets change to the specified state number.

Required parameters:
    value = state_no (int)
        Specifies the number of the state to change the targets to.

Optional parameters:
    ID = target_id (int)
        Specifies the desired target ID to affect. Only targets with this target ID will be affected. Defaults to -1 (affects all targets.)

Examples:
Code:
;Fighter Factory 3
[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
trigger1 =
value =
ID = -1
;ignorehitpause =
;persistent =

Related SCTRL:
BindToTarget (SCTRL)
TargetBind (SCTRL)
TargetDrop (SCTRL)
TargetFacing (SCTRL)
TargetLifeAdd (SCTRL)
TargetPowerAdd (SCTRL)
TargetVelAdd (SCTRL)
TargetVelSet (SCTRL)

Related Triggers:
NumTarget (Triggers)

Additional Notes
This state controller is nearly mandatory for all throws, as well as cinematic attacks that you wish to have full control over Player2's actions on hit as opposed to the default hit behavior. Note however that the state number Player2 changes to through the use of this controller will be the state number from Player1's files, NOT Player2's. Thus, if Player1 and Player2 both have a state number 2000, using TargetState will send Player2 into Player1's State 2000. Due to this, states that are defined in Player1's files to be used exclusively by the TargetState SCTRL are often commonly referred to as "custom states".

It is also worth noting that TargetState will not affect Player2 if Player2 has a HitOverride active at the time the initial attack makes contact.

It is also strongly recommended that you use the SelfState controller within any states that you intend to place Player2 in through the use of TargetState and wish to have them return to their own states (ie: such as any landing states where Player2 gets up). If Player2 should execute any Changestate SCTRLs while still in Player1's states, the state they change to will be from Player1's files rather than his/her own.
Last Edit: November 25, 2015, 04:51:56 am by Odb718
Re: TargetState (SCTRL)
#2  October 24, 2016, 03:18:04 am
  • ******
    • www.justnopoint.com/
When using targetstate with MoveHit and persistent = 1 be sure to set MoveHit=1 so the targetstate isn't trying to activate on every tick of the hit causing undesired results.