YesNoOk
avatar

BindToParent (SCTRL) (Read 4263 times)

Started by JustNoPoint, October 27, 2015, 07:27:20 pm
Share this topic:
BindToParent (SCTRL)
#1  October 27, 2015, 07:27:20 pm
  • ******
    • www.justnopoint.com/
If the player is a helper, binds the player to a specified position relative to its parent. If the player is not a helper, this controller does nothing.

Required parameters:

none
Optional parameters:

time = bind_time (int)
Specify number of ticks that this binding should be effective. Defaults to 1.

facing = facing_flag (int)
If facing_flag is -1, makes the player always face the opposite direction from its parent during the binding time. If facing_flag * is 1, makes the player always face the same direction as its parent during the binding time. If *facing_flag is 0, the player will not turn regardless of what its parent does. Defaults to 0.

pos = pos_x (float), pos_y (float)
pos_x and pos_y specify the offsets (from the parent's axis) to bind to. Defaults to 0,0.

Notes:
If the player's parent is destroyed (for example, if it is a helper, and executes DestroySelf), then the effect of BindToParent is terminated.

Example:
none
Re: BindToParent (SCTRL)
#2  October 27, 2015, 07:59:16 pm
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
Helpers' code is executed with 1 tick delay, that means the binding will begin 1 tick after the parent's time
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!