Triggers (changed) - ikemen-engine/Ikemen-GO GitHub Wiki
The triggers in this page already existed in Mugen, but were adjusted or received new features in Ikemen GO.
Refer to the sidebar for quicker navigation.
Changed trigger redirections
Helper (nightly build only)
The Helper
redirection now also accepts an optional index argument, through the new format Helper(ID, index)
. Defaults to 0 (first one).
The old formats still work exactly the same.
Example:
trigger1 = NumHelper(1005) >= 2
trigger1 = Helper(1005, 1), MoveType = A; The second helper with ID 1005
Target (nightly build only)
The Target
redirection now also accepts an optional index argument, through the new format Target(ID, index)
. Defaults to 0 (first one).
The old format still works exactly the same.
Example:
trigger1 = NumTarget >= 2
trigger1 = Target(-1, 1), Alive; The second target with any ID
Changed triggers
Command
If a character has ikemenversion
, when the Command
trigger is redirected to another player, the engine will first check if the other player is performing its own command with the same name. If not, it'll check if it's performing the command from our own command list. Otherwise it will work like Mugen.
Const
The Const trigger can now also read Ikemen GO's new constants.
Const(constants)
Returns the value of one of the player's constants from the Constants(Character-features/#cns_constants) section.
[Constants]
FireballState = 1000
[State -1, Fireball]
triggerall = NumHelper(Const(FireballState)) = 0
data.dizzypoints
Returns the value of the player's [Data] dizzypoints constant.
data.fall.defence_up
Returns the value of the player's [Data] fall.defence_up constant.
data.guardpoints
Returns the value of the player's [Data] guardpoints constant.
data.guardsound.channel
Returns the value of the player's [Data] guardsound.channel constant.
data.hitsound.channel
Returns the value of the player's [Data] hitsound.channel constant.
size.height.crouch
Returns the value of the player's [Size] height.crouch constant.
size.height.air.top
Returns the first value of the player's [Size] height.air constant.
size.height.air.bottom
Returns the second value of the player's [Size] height.air constant.
size.height.down
Returns the value of the player's [Size] height.down constant.
velocity.air.gethit.ko.add
Returns the value of the player's [Velocity] air.gethit.ko.add constant.
velocity.air.gethit.ko.add.x
velocity.air.gethit.ko.add.y
velocity.air.gethit.ko.add.z
velocity.air.gethit.ko.ymin
Returns the value of the player's [Velocity] air.gethit.ko.ymin constant.
velocity.ground.gethit.ko.xmul
Returns the value of the player's [Velocity] ground.gethit.ko.xmul constant.
velocity.ground.gethit.ko.add
Returns the value of the player's [Velocity] ground.gethit.ko.add constant.
velocity.ground.gethit.ko.add.x
velocity.ground.gethit.ko.add.y
velocity.ground.gethit.ko.add.z
velocity.ground.gethit.ko.ymin
Returns the value of the player's [Velocity] ground.gethit.ko.ymin constant.
GameHeight
If mugenVersion is specified as 1.0 in character's Info(Character-features/#def_info) section, GameHeight returns the same value as ScreenHeight.
GameWidth
If mugenVersion is specified as 1.0 in character's Info(Character-features/#def_info) section, GameWidth returns the same value as ScreenWidth.
GetHitVar
air.velocity.x (y, z) (nightly build only)
Returns the X, Y or Z component of the last HitDef's air.velocity
parameter, even if the player was not hit in the air. (float)
airguard.velocity.x (y, z) (nightly build only)
Returns the X, Y or Z component of the last HitDef's airguard.velocity
parameter, even if the player did not guard in the air. (float)
air.animtype, fall.animtype, ground.animtype
Returns the literal value specified in the HitDef.
attr (nightly build only)
Returns the last HitDef attr
assignment. (string)
trigger1 = getHitVar(attr) = SCA, HA
dizzypoints
Returns last HitDef dizzypoints
value. (int)
down.velocity.x (y, z) (nightly build only)
Returns the X, Y or Z component of the last HitDef's down.velocity
parameter, even if the player was not hit while down. (float)
facing (nightly build only)
Returns last HitDef p2facing
value. (int)
fall.envshake.mul
Returns last HitDef fall.envshake.mul
value. (float)
fall.zvel (nightly build only)
Returns z velocity after bouncing off ground (float)
frame (nightly build only)
Returns true only during the same frame where the player got hit by an attack. (bool)
ground.velocity.x (y, z) (nightly build only)
Returns the X, Y or Z component of the last HitDef's ground.velocity
parameter, even if the player was not hit on the ground. (float)
guard.velocity.x (y, z) (nightly build only)
Returns the X, Y or Z component of the last HitDef's guard.velocity
parameter, even if the player did not guard on the ground. (float)
guardpoints
Returns last HitDef guardpoints
value. (int)
guardcount (nightly build only)
Returns how many hits the player has guarded without a chance to fight back. (int)
guarddamage
Returns the second value of the last HitDef's damage
parameter. (int)
guardpower
Returns the second value of the last HitDef's givepower
parameter. In other words, the power received when guarding. (int)
hitpower
Returns the first value of the last HitDef's givepower
parameter. In other words, the power received when getting hit. (int)
hitdamage
Returns the first value of the last HitDef's damage
parameter. (int)
id
Returns the ID of the last character that hit the player. (int)
kill
Returns the kill flag of the last hit or LifeAdd the character suffered. (int)
playerno
Returns the PlayerNo of the last character that hit the player. (int)
power (nightly build only)
Returns how much power the player received from the last hit, regardless of getting hit or guarding. (int)
priority (nightly build only)
Returns the numerical value of the attack priority of the last HitDef. (int)
redlife
Returns last HitDef redlife
value. (int)
score
Returns last HitDef score
value. (float)
type
Returns the value of either groundtype or airtype, depending on the character's StateType upon being hit. Such a trigger was documented in Mugen but did not work.
xaccel (nightly build only)
Returns the X acceleration set by the hit. (float)
NOTE: Currently, this parameter will only work if the character does not override the common1.cns.zss
states that use it.
xveladd (nightly build only)
This trigger was dummied out in Mugen, always returning 0. In Ikemen, it works as documented.
yveladd (nightly build only)
This trigger was dummied out in Mugen, always returning 0. In Ikemen, it works as documented.
zaccel (nightly build only)
Returns the Z acceleration set by the hit. (float)
NOTE: Currently, this parameter will only work if the character does not override the common1.cns.zss
states that use it.
zvel (nightly build only)
Returns the fixed z-velocity imparted by hit. (float)
zoff (nightly build only)
"Snap" z offset when hit.
IsHelper (nightly build only)
The IsHelper
trigger now also accepts an optional index argument, through the new format IsHelper(ID, index)
. Defaults to -1 (any index).
The old formats still work exactly the same.
Example:
trigger1 = IsHelper(123, 2); Is the third helper with ID 123
P2BodyDist (nightly build only)
Y (nightly build only)
In Mugen, this trigger merely does the same as P2Dist Y
. If a character has ikemenversion
, it will instead return the distance between the size boxes of the two players.
Z (nightly build only)
P2BodyDist now also accepts a Z argument. When there is overlap between the players' Z width, it returns 0, otherwise returns the distance between their theoretical width boxes.
P2Dist Z (nightly build only)
The P2Dist
trigger now also accepts a Z
argument. Returns the distance between the players in the Z axis.
ParentDist Z (nightly build only)
The ParentDist
trigger now also accepts a Z
argument. Returns the distance between the helper and its parent in the Z axis.
RootDist Z (nightly build only)
The RootDist
trigger now also accepts a Z
argument. Returns the distance between the helper and its root in the Z axis.
StageVar
StageVar now accepts all stage parameters that ModifyStageVar state controller can change. In addition it accepts the following parameters (nightly build only):
stageinfo.localcoord.x = width (int)
stageinfo.localcoord.y = height (int)
TeamMode = Tag
Now TeamMode can also return "Tag".
Note that TeamMode returns "Turns" during Ratio mode.
trigger1 = TeamMode = Tag