Trigger
Jeder Trigger von M.U.G.E.N 1.1 mit seinen Argumenten, Rückgabetyp, der Angabe, ob er umgeleitet werden kann, einem Beispiel und seinem Status in rugen.
Trigger sind die Werte, die du in trigger1 = ...-Zeilen testest und in
Parameterausdrücken verwendest. Diese Seite listet jeden Trigger von
M.U.G.E.N 1.1 auf, nach Themen gruppiert. Zu Operatoren, Typen und der
Redirection-Syntax siehe Ausdrücke.
- Returns ist der Werttyp.
bool-Trigger liefern 1 oder 0. - Redirectable heißt, er kann einer Redirection wie
parent,oderenemynear,folgen und liest dann diesen Spieler. - Status: Supported, Partial (die Notiz sagt, was abweicht) oder Not yet.
Ein unbekannter Trigger-Name ist in rugen ein Kompilierfehler: Der
Controller wird verworfen, und
rugen checkgibt die Zeile aus.
126 triggers:Supported 117Partial 9Not yet 0
- Abs
- Acos
- AILevel
- Alive
- Anim
- AnimElem
- AnimElemNo
- AnimElemTime
- AnimExist
- AnimTime
- Asin
- Atan
- AuthorName
- BackEdge
- BackEdgeBodyDist
- BackEdgeDist
- BottomEdge
- CameraPos
- CameraZoom
- CanRecover
- Ceil
- Command
- Cond
- Const
- Const240p
- Const480p
- Const720p
- Cos
- Ctrl
- DrawGame
- E
- Exp
- Facing
- Floor
- FrontEdge
- FrontEdgeBodyDist
- FrontEdgeDist
- FVar
- GameHeight
- GameTime
- GameWidth
- GetHitVar
- HitCount
- HitDefAttr
- HitFall
- HitOver
- HitPauseTime
- HitShakeOver
- HitVel
- ID
- IfElse
- InGuardDist
- IsHelper
- IsHomeTeam
- LeftEdge
- Life
- LifeMax
- Ln
- Log
- Lose
- MatchNo
- MatchOver
- MoveContact
- MoveGuarded
- MoveHit
- MoveReversed
- MoveType
- Name
- NumEnemy
- NumExplod
- NumHelper
- NumPartner
- NumProj
- NumProjID
- NumTarget
- P1Name
- P2BodyDist
- P2Dist
- P2Life
- P2MoveType
- P2Name
- P2StateNo
- P2StateType
- P3Name
- P4Name
- PalNo
- ParentDist
- Pi
- PlayerIDExist
- Pos
- Power
- PowerMax
- PrevStateNo
- ProjCancelTime
- ProjContact
- ProjContactTime
- ProjGuarded
- ProjGuardedTime
- ProjHit
- ProjHitTime
- RightEdge
- RootDist
- RoundNo
- RoundsExisted
- RoundState
- ScreenHeight
- ScreenPos
- ScreenWidth
- SelfAnimExist
- Sin
- StageVar
- StateNo
- StateType
- SysFVar
- SysVar
- Tan
- TeamMode
- TeamSide
- TicksPerSecond
- Time
- TimeMod
- TopEdge
- UniqHitCount
- Var
- Vel
- Win
Mathefunktionen
Abs Supported
Absolute value.
trigger1 = Abs(Vel X) < 0.5
Acos Supported
Arc cosine in radians.
fvar(1) = Acos(0.5)
Asin Supported
Arc sine in radians.
fvar(1) = Asin(1)
Atan Supported
Arc tangent in radians.
fvar(1) = Atan(P2Dist Y / P2Dist X)
Ceil Supported
Rounds up to the next integer.
value = Ceil(Life / 100.0)
Cond Supported
Returns a if cond is true, else b. Only the chosen branch is evaluated, so it can guard := or division.
value = Cond(var(1) > 0, 200, 210)
Cos Supported
Cosine of an angle in radians.
x = 3 * Cos(Time * 0.1)
E Supported
Euler's number, 2.718...
fvar(2) = E ** 2
Exp Supported
e raised to the argument.
fvar(2) = Exp(-Time / 30.0)
Floor Supported
Rounds down to an integer.
value = Floor(Pos X / 10)
IfElse Supported
Like Cond, but both branches are evaluated before choosing. Use Cond when a branch has side effects.
value = IfElse(Facing = 1, 0, 1)
Ln Supported
Natural logarithm. A zero or negative argument gives bottom.
fvar(3) = Ln(Time + 1)
Log Supported
Logarithm of value in base.
fvar(3) = Log(2, 64)
Pi Supported
The constant 3.14159...
angle = Time * 180 / Pi
Sin Supported
Sine of an angle in radians.
y = -2 * Sin(Time * 0.2)
Tan Supported
Tangent of an angle in radians.
fvar(4) = Tan(Pi / 4)
State und Animation
Alive Supported
1 while the player has not been KO'd.
trigger1 = !Alive
Anim Supported
Current action number.
trigger1 = Anim = 200
AnimElem Supported
True on the first tick of element n. With the second part it compares the ticks since element n started: AnimElem = 3, >= 0 is true from element 3 on.
trigger1 = AnimElem = 4
AnimElemNo Supported
Element that will be showing ticks ticks from now (0 = now).
trigger1 = AnimElemNo(0) = 5
AnimElemTime Supported
Ticks since element n started; negative before it.
trigger1 = AnimElemTime(3) >= 0
AnimExist Supported
Whether an action exists in the .air file of the state owner.
trigger1 = AnimExist(195)
AnimTime Supported
Ticks until the end of the animation, as 0 or a negative number. 0 means the last tick of a non-looping animation.
trigger1 = AnimTime = 0
CanRecover Supported
While falling: 1 once the player may recover.
trigger1 = CanRecover && Command = "recovery"
Command Supported
True while the named command from the .cmd was just entered. != works too. Helpers only see commands with keyctrl = 1.
trigger1 = Command = "QCF_x"
Ctrl Supported
1 if the player has control.
trigger1 = Ctrl
Facing Supported
1 facing right, -1 facing left.
trigger1 = Facing = -1
MoveType Supported
Compares the move type: idle, attacking, being hit. != works too.
trigger1 = MoveType = H
P2MoveType Supported
Move type of P2 (the nearest opponent).
trigger1 = P2MoveType = A
P2StateNo Supported
State number of P2.
trigger1 = P2StateNo = 5120
P2StateType Supported
State type of P2.
trigger1 = P2StateType = A
PrevStateNo Supported
The state the player was in before this one.
trigger1 = PrevStateNo = 40
StateNo Supported
Current state number.
trigger1 = StateNo = [200, 299]
StateType Supported
Compares the state type: standing, crouching, air, lying down.
trigger1 = StateType != A
Time Supported
Ticks spent in the current state, starting at 0. rugen also accepts the Ikemen name StateTime.
trigger1 = Time = 0
TimeMod Supported
Old form of Time % div = rem; prefer the modulo form in new code.
trigger1 = TimeMod = 4, 0
SelfAnimExist Supported
Like AnimExist, but always looks in the player's own .air.
trigger1 = SelfAnimExist(5300)
Position, Abstand und Geschwindigkeit
BackEdgeBodyDist Supported
Distance from the back of the player's width box to the back screen edge.
trigger1 = BackEdgeBodyDist < 10
BackEdgeDist Supported
Distance from the player's axis to the back screen edge.
trigger1 = BackEdgeDist < 30
FrontEdgeBodyDist Supported
Distance from the front of the width box to the front screen edge.
trigger1 = FrontEdgeBodyDist < 10
FrontEdgeDist Supported
Distance from the axis to the front screen edge.
trigger1 = FrontEdgeDist > 60
InGuardDist Supported
1 when an opponent's attack or projectile is close enough that holding back would guard.
trigger1 = InGuardDist
P2BodyDist Supported
Distance to P2 measured between the width boxes (x) or the axes (y).
trigger1 = P2BodyDist X < 20
P2Dist Supported
Distance between the axes of the player and P2; x is positive in front.
trigger1 = P2Dist X = [0, 80]
ParentDist Supported
Helpers: distance to the parent.
trigger1 = ParentDist X > 100
Pos Supported
Position: x from the screen centre, y from the floor (negative is up).
trigger1 = Pos Y >= 0
RootDist Supported
Helpers: distance to the root.
trigger1 = RootDist X < 0
ScreenPos Supported
Position relative to the top-left corner of the screen.
trigger1 = ScreenPos X < 40
Vel Supported
Velocity; x positive is forward, y positive is down.
trigger1 = Vel Y > 0
Angreifen und Getroffenwerden
GetHitVar Supported
Reads a value stored from the last hit taken: damage, hittime, slidetime, ctrltime, xvel, yvel, yaccel, fall, fall.yvel, fall.recover, animtype, groundtype, airtype, hitcount, guarded, isbound, chainid, and so on.
trigger1 = GetHitVar(fall)
HitCount Supported
Hits the current attack has done (resets with each new HitDef).
trigger1 = HitCount >= 2
HitDefAttr Supported
True while a HitDef is active and its attr matches, e.g. SC, NA, SA.
trigger1 = HitDefAttr = A, HA
HitFall Supported
In a get-hit state: 1 if the hit made the player fall.
trigger1 = HitFall
HitOver Supported
In a get-hit state: 1 once the hit time is over.
trigger1 = HitOver
HitPauseTime Supported
Ticks of hit pause left for the attacker.
trigger1 = HitPauseTime = 0
HitShakeOver Supported
In a get-hit state: 1 once the hit shake is over.
trigger1 = HitShakeOver
HitVel Supported
Velocity stored from the last hit.
trigger1 = HitVel X > 3
MoveContact Supported
Non-zero once the current attack touched someone (hit or guard). Counts ticks since contact.
trigger1 = MoveContact
MoveGuarded Supported
Non-zero once the current attack was guarded.
trigger1 = MoveGuarded
MoveHit Supported
Non-zero once the current attack hit.
trigger1 = MoveHit && Command = "x"
MoveReversed Partial
Non-zero once the current attack was reversed by a ReversalDef.
- Always 0: a reversal does not mark the attacker yet.
trigger1 = MoveReversed
UniqHitCount Supported
Like HitCount, but counts each hit on each opponent.
trigger1 = UniqHitCount >= 3
Leben und Power
Life Supported
Current life.
trigger1 = Life < LifeMax / 4
LifeMax Supported
Maximum life (life in [Data]).
value = LifeMax
P2Life Supported
Life of P2.
trigger1 = P2Life < 100
Power Supported
Current power.
trigger1 = Power >= 1000
PowerMax Supported
Maximum power (power in [Data]).
trigger1 = Power = PowerMax
Helper, Projektile, Explods und Targets
IsHelper Supported
1 if the player is a helper, or a helper with that id.
trigger1 = !IsHelper
NumExplod Supported
Number of the player's explods (with that id).
trigger1 = !NumExplod(1010)
NumHelper Supported
Number of the player's helpers (with that id).
trigger1 = NumHelper(1201) = 0
NumProj Supported
Number of the player's projectiles on screen.
trigger1 = NumProj = 0
NumProjID Supported
Number of the player's projectiles with a projid.
trigger1 = NumProjID(1000) < 2
NumTarget Supported
Number of current targets (hit by a HitDef with that id).
trigger1 = NumTarget(800)
ProjCancelTime Supported
Ticks since a projectile with that projid was cancelled by another projectile; -1 if never.
trigger1 = ProjCancelTime(1000) = 1
ProjContact Supported
Old-style: whether a projectile (with an optional id appended, ProjContact1000) made contact, optionally within t ticks.
trigger1 = ProjContact1000 = 1, < 15
ProjContactTime Supported
Ticks since a projectile with that projid made contact; -1 if never.
trigger1 = ProjContactTime(1000) = [0, 10]
ProjGuarded Supported
Old-style: whether a projectile was guarded.
trigger1 = ProjGuarded1000 = 1
ProjGuardedTime Supported
Ticks since a projectile with that projid was guarded.
trigger1 = ProjGuardedTime(1000) = 0
ProjHit Supported
Old-style: whether a projectile hit.
trigger1 = ProjHit1000 = 1, < 20
ProjHitTime Supported
Ticks since a projectile with that projid hit.
trigger1 = ProjHitTime(1000) = 0
PlayerIDExist Supported
Whether a player or helper with that unique id exists.
trigger1 = PlayerIDExist(var(40))
ID Supported
Unique id of the player or helper; use it with PlayerID(n) redirection.
var(40) = ID
NumEnemy Supported
Number of opponents in the fight.
trigger1 = NumEnemy > 1
NumPartner Partial
Number of partners (team modes).
- Always 0: no team modes yet.
trigger1 = NumPartner = 0
Runde und Match
DrawGame Supported
1 after the round ended in a draw.
trigger1 = DrawGame
Lose Supported
1 after the player lost the round. Variants: LoseKO, LoseTime.
trigger1 = Lose
MatchNo Partial
Number of the current match in arcade mode, from 1.
- Always 1.
trigger1 = MatchNo = 6
MatchOver Supported
1 once the match is decided.
trigger1 = MatchOver
RoundNo Supported
Current round, from 1.
trigger1 = RoundNo = 1
RoundsExisted Supported
Rounds the player has been in before this one.
trigger1 = RoundsExisted = 0
RoundState Supported
0 screen fades in, 1 intros, 2 fight, 3 round end (no control), 4 win poses.
trigger1 = RoundState = 2
TeamMode Partial
The team mode of the player's side.
- Always
Single: rugen has no team modes yet.
trigger1 = TeamMode = Single
TeamSide Supported
1 for the left team, 2 for the right.
trigger1 = TeamSide = 2
IsHomeTeam Supported
1 for the side that is "at home" (the left side outside arcade).
trigger1 = IsHomeTeam
Win Supported
1 after the player won the round. Variants: WinKO, WinTime, WinPerfect.
trigger1 = WinPerfect
AILevel Supported
0 for a human, 1 to 8 for the computer's difficulty.
trigger1 = AILevel > 0
GameTime Supported
Ticks since the match began.
trigger1 = GameTime % 60 = 0
TicksPerSecond Supported
Ticks per second of game time (60).
value = 3 * TicksPerSecond
Bildschirm und Stage
BackEdge Supported
x of the back screen edge, in the player's coordinates.
trigger1 = Pos X < BackEdge + 20
BottomEdge Supported
y of the bottom screen edge.
trigger1 = Pos Y > BottomEdge
CameraPos Partial
Camera position.
CameraPos Yis always 0.
trigger1 = CameraPos X > 100
CameraZoom Partial
Current camera zoom (1 = no zoom).
- Always 1, even when the camera zooms.
trigger1 = CameraZoom < 1
FrontEdge Supported
x of the front screen edge.
trigger1 = Pos X > FrontEdge - 20
GameHeight Supported
Height of the visible game area in the player's units (changes with zoom).
y = GameHeight / 2
GameWidth Supported
Width of the visible game area in the player's units.
x = GameWidth / 2
LeftEdge Supported
x of the left screen edge.
trigger1 = Pos X < LeftEdge + 10
RightEdge Supported
x of the right screen edge.
trigger1 = Pos X > RightEdge - 10
ScreenHeight Supported
Height of the screen in the player's localcoord.
y = ScreenHeight
ScreenWidth Supported
Width of the screen in the player's localcoord.
x = ScreenWidth / 2
TopEdge Partial
y of the top screen edge.
- Always 0.
trigger1 = Pos Y < TopEdge
StageVar Supported
Compares stage info: info.name, info.displayname, info.author.
trigger1 = StageVar(info.name) = "Training Room"
Variablen, Konstanten und Namen
Const Supported
Reads a constant from the .cns: data.life, size.ground.front, velocity.walk.fwd.x, movement.yaccel, and so on.
y = Const(velocity.jump.y)
Const240p Supported
Converts a value written for 320x240 into the player's localcoord.
x = Const240p(4)
Const480p Supported
Converts a value written for 640x480.
x = Const480p(8)
Const720p Supported
Converts a value written for 1280x720.
x = Const720p(16)
FVar Supported
Float variable n (0 to 39). fvar(n) := v assigns inside an expression.
trigger1 = FVar(3) > 1.5
Var Supported
Int variable n (0 to 59).
trigger1 = Var(10) = 1
SysFVar Supported
System float variable n (0 to 4), reserved for common files.
trigger1 = SysFVar(0) > 0
SysVar Supported
System int variable n (0 to 4), reserved for common files.
trigger1 = SysVar(1) = 0
Name Supported
Compares the player's name (case-insensitive).
trigger1 = Name = "Kung Fu Man"
P1Name Supported
Same as Name.
trigger1 = P1Name = "Kung Fu Man"
P2Name Supported
Compares the name of P2.
trigger1 = P2Name = "Evil Ken"
P3Name Partial
Compares the name of the player's partner.
- Always false: no team modes yet.
trigger1 = P3Name = "Suave Dude"
P4Name Partial
Compares the name of P2's partner.
- Always false: no team modes yet.
trigger1 = P4Name = "Suave Dude"
AuthorName Supported
Compares the author field of the .def.
trigger1 = AuthorName = "Elecbyte"
PalNo Supported
Palette the player was picked with (1 to 12).
trigger1 = PalNo = 12
rugen-Erweiterungen
Diese Trigger sind Ergänzungen von rugen. Sie sind immer verfügbar; ältere Charaktere nutzen sie einfach nicht.
| Trigger | Returns | Bedeutung |
|---|---|---|
GroundY | float | Höhe der Fläche unter dem Spieler: 0 auf dem Boden, negativ auf einer Plattform. |
OnPlatform | bool | 1, solange er auf einer Plattform steht. |
StateTime | int | Dasselbe wie Time (Ikemen-Schreibweise). |
[State 52, land on a platform]
type = ChangeAnim
trigger1 = Time = 0 && OnPlatform
value = 48 ; your own "landed high up" animation
Die Statusdaten aktualisieren
Siehe State Controller: die Statusdaten aktualisieren.
Originalreferenz: elecbyte.com/mugendocs-11b1.
Stimmt hier etwas nicht? Auf GitHub bearbeiten.