The Mugen Fighters Guild

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

Title: TargetBind (SCTRL)
Post by: JustNoPoint on October 31, 2015, 02:16:17 pm
Binds the player's specified targets to a specified location relative to the player's axis.

Required parameters:
none

Optional parameters:
time = bind_time (int)
Specifies number of ticks that this binding should be in effect. Defaults to 1.

ID = bind_id (int)
Specifies the desired target ID to bind. Only targets with this target ID will be bound. Defaults to -1 (bind all targets.)

pos = x_pos, y_pos (float)
Specifies the offset from the player's axis to bind the target to. Defaults to 0,0 if omitted.

Example:
Code:
;Fighter Factory 3
[State 0, TargetBind]
type = TargetBind
trigger1 =
time = 1
id = -1
pos = 0,0
;ignorehitpause =
;persistent =

Related SCTRL:
BindToTarget (SCTRL) (http://mugenguild.com/forum/topics/bindtotarget-sctrl-170088.0.html)
TargetDrop (SCTRL) (http://mugenguild.com/forum/topics/targetdrop-sctrl-170205.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)

Additional Notes: Issues may arise if your state does not have a movetype (http://mugenguild.com/forum/topics/movetype-cns-169456.0.html) value of "A."
Title: Re: TargetBind (SCTRL)
Post by: DJ_HANNIBALROYCE on October 31, 2015, 02:20:13 pm
thank u...i always had trouble with this. i need to give my characters some throws....i always tend to edit them and make mistakes...then keep the mistake that looks awesome.
Title: Re: TargetBind (SCTRL)
Post by: XGargoyle on November 25, 2018, 06:18:28 pm
Gethitvar(isbound) will bug if P2 performs the move with the TargetBind controllers AND the movetype is set to I.
Under this instance, P1 will see Gethitvar(isbound)=0 and eventually go back to his owns SelfState if using a trigger like !Gethitvar(isbound).
In the same scenario, if P1 performs the same move instead, P2 will see Gethitvar(isbound)=1 and still be under P1's custom state, hence the bug with the internal engine

In this scenario, TargetBind is working fine and positioning the player in the corresponding screen position, but since the movetype is set to I (no attack), P1 gets a different gethitvar(isbound) data than P2.

The "fix" to this bug is to ensure that any state with TargetBind controllers are set as movetype=A, otherwise it will work only for P1 but not for P2

More details here:
http://mugenguild.com/forum/topics/p1-not-bound-if-p2-initiates-hold-possible-bug-gethitvarisbound-185393.0.html