PosAdd (SCTRL)

Started by JustNoPoint, October 31, 2015, 12:04:16 AM

Previous topic - Next topic

JustNoPoint

Offsets the player's position by the specified amounts. The X coordinate is relative to the player's axis, with positive values moving in the direction that the player is facing. The Y coordinate is relative to the player's axis, with negative values moving up.

Required parameters:
none

Optional parameters:
x = x_value (float)
Moves the player x_value pixels forward. Defaults to 0.

y = y_value (float)
Moves the player y_value pixels downwards. Defaults to 0.

Example:
;Fighter Factory 3
[State 0, PosAdd]
type = PosAdd
trigger1 =
x = 0
y = 0
;ignorehitpause =
;persistent =


Related SCTRL:
PosSet (SCTRL)
PosFreeze (SCTRL)

Related Triggers:
Pos (Triggers)

Loves Pachirisu

Example: (typed on a phone so bare with me.)

[State 1200]
Value = posadd
Trigger1 = time = 20.
X = 20
Ctrl = O

Sends you 20 spaces forward at 20 ticks. This is mostly used for teleporting mpves lsuch the Mortal Kombat ninjas like Ermac
Pokecommunity account (Will start learning about romhacking): http://www.pokecommunity.com/member.php?u=553303

Why are there some people here trying to go into their ways into trying to ruin my Mugen hobby here and make me look like bad?



https://www.youtube.com/watch?v=3_TMrr6eqQc

Ricepigeon

The PosAdd controller is useful for setting position relative to the screen. Since there is no ScreenPosAdd or equivalent controller, you need to use the ScreenPos trigger as a workaround like so:


[State ???, PosAdd]
type = PosAdd
trigger1 =
x = ((gamewidth/2.0)-(ScreenPos X))*facing
y = (gameheight/2.0)-(ScreenPos Y)


This will place the player in the center of the screen.

XGargoyle

Quote from: Ricepigeon on January 22, 2016, 03:35:43 PM


[State ???, PosAdd]
type = PosAdd
trigger1 =
x = ((gamewidth/2.0)-(ScreenPos X))*facing
y = (gameheight/2.0)-(ScreenPos Y)


This will place the player in the center of the screen.

Only for 1.0 and 1.1 though


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!