Reference:About Events
From Fraxy Compendium Redux
This is a reference for using events effectively. If you want to know more of the controls/interface, check the editor tutorial. If you want to see some examples of events, see the event tutorials page.
Contents |
What is an event?
If you have ever done any programming, then you are probably familiar with events. You may be familiar with if-else statements and looping structures. In Fraxy, events are similar in principle. Events are a very powerful method to change the functions of a part. You can do many things with events such as firing faster Slow Rays and triggering parts to appear once the player gets close. If you really want your creation to really stand out, events are the way to go. However, one must also be wise in using events effectively. Like parts, there are limits to the number of events a part can have. The maximum amount of events per part is 16 (or 32). Events also increase the memory size of the creation file.
Anatomy of an event
An event consists of three parts: Condition, Action, and Extra Setting. Most emphasis will be on the Condition and Action sections.
Condition
This is the trigger for the event. The values are:
- None - There is no Condition. This is not a valid value if you want to use the event.
- Always - The event will always be active.
- Destroying - The event will trigger as the part is being destroyed, that is the destruction animation.
- Destroyed - The event will trigger when the part is destroyed.
- Stun - The event will trigger when the part is stunned.
- Not Stun - The event will trigger while the part is not stunned.
- Movement(ON) - The event will trigger as the part is active, that is Movement is set to Play.
- Movement(OFF) - The event will trigger as the part is inactive, that is Movement is set to Stop.
- Durability - The event triggers when the part's durability is =(equal), !(not equal), >(greater), <(lesser), &(), &!() to the given value. Good for exact values.
- Durability% - The event triggers when the part's durability percentage is =(equal), !(not equal), >(greater), <(lesser), &(), &!() to the given value. Good for broad/constantly changing durability.
- Rank - The event triggers when the part's rank is =(equal), !(not equal), >(greater), <(lesser), &(), &!() to the given value.
- Move Action - The event triggers when the part's current move action is =(equal), !(not equal), >(greater), <(lesser), &(), &!() to the given value. If the part only has one move action, this event may be useless.
- Move Frame - The event triggers when the part's current move frame is =(equal), !(not equal), >(greater), <(lesser), &(), &!() to the given value.
- Attack Action - The event triggers when the part's current attack action is =(equal), !(not equal), >(greater), <(lesser), &(), &!() to the given value. If the part does not have an attack setting, this action is useless.
- Attack Frame - The event triggers when the part's current attack frame is =(equal), !(not equal), >(greater), <(lesser), &(), &!() to the given value. If the part does not have an attack setting, this action is useless.
- Notify Status - See the Notify Status tutorial. The only operators needed are & and &!.
- Distance - The event triggers depending on the distance.
- Distance(Player) - The event triggers depending on if the distance from the player is =(equal), !(not equal), >(greater), <(lesser), &(), &!() to the given value.
- Variable 1-4 - The event triggers if Variable 1-4 is =(equal), !(not equal), >(greater), <(lesser), &(), &!() to the given value.
- Player Status - The following are tags based on the status of the player.
- P_Control - (Values 0 - 1)
- 0 - Player is respawning/dead
- 1 - Player is alive
- P_Destroy - ? (Values 0 - infinity, but usually 0)
- P_Stun - This is based on the time the player is stunned. (Values 0 - infinity)
- P_Energy - This is the player's energy. (Values 0 - 100)%
- P_Using Equip - This is based on if the player has activated or is currently using an equipment type. (Values 0 - 2)
- 0 - Nothing
- 1 - Just activated.
- 2 - Is currently using.
- P_Using Weapon - This is based on if the player has activated or is currently using a weapon. (Values 0 - 2)
- 0 - Nothing
- 1 - Just activated.
- 2 - Is currently using.
- P_Using Support - This is based on if the player has activated or is currently using a support type. (Values 0 - 2)
- 0 - Nothing
- 1 - Just activated.
- 2 - Is currently using.
- P_Control - (Values 0 - 1)
Action
These are the actions for the event. A number of actions can affect not only the current part but any part. There can be up to four actions for one event.
- None - There is no Action.
- Variable - The action affects a variable.
- Substitute(=) - Forcefully put in a value for Variable 1-4 for a given part.
- Add(+) - Add a value for Variable 1-4 for a given part.
- Subtract(-) - Subtract a value for Variable 1-4 for a given part.
- Multiply(*) - Multiply a value for Variable 1-4 for a given part.
- Divide(/) - Divide a value for Variable 1-4 for a given part.
- Get a variable of target for variable - Get the value from one variable of a part and put it into a variable for the current part.
- Destroy - Cause a part to self-destruct normally. This means the part acts as though the player destroyed it. So items will appear.
- Suicide - Cause a part to self-destruct abnormally. This means the part will act as though the player went out of bounds. Items will not appear.
- Delete(Phase In) - Cause a part to disappear. This is similar to Suicide except there is no destruction animation.
- Detach - Causes a part to detach. This is a replacement for the Panel-Detach and Deploy Core parts.
- Change Connect Type - Changes a part's connection type. See the editor tutorial for all current connection types.
- Part Status - These actions deal with special aspects of the part.
- Change Rank - The rank of a part is added, subtracted, multiplied, divided, or equals the value.
- Change Durability - The durability of a part is added, subtracted, multiplied, divided, or equals the value.
- Change Durability% - The durability percentage of a part is added, subtracted, multiplied, divided, or equals the value. This is useful for filling up durability completely.
- Change Maximum Durability - The maximum durability of a part is added, subtracted, multiplied, divided, or equals the value. This is the initial durability value or durability at 100%.
- Change Score - The score of a part is added, subtracted, multiplied, divided, or equals the value.
- Change Extra Param - The Extra Parameters of a part is modified. See the Extra Parameters page for more information.
- Note: For all flags, see this page.
- Draw Flag - These deal with part appearance.
- Hide - This hides a part.
- Normal - This makes a part able to be hit.
- Shadow - This shadows a part.
- Main Health Bar - This makes a health bar appear at the top of the screen that tracks the durability of the part. Values are Take Off, Use (If Not Used), and Use (By Force).
- Sub Health Bar - This makes a small health bar appear near the part that tracks the durability of the part.
- Change Draw Order - Changes the draw order of a part.
- Extra Flag and Option - These change the main properties of a part.
- Change Auto Destroy Flag - This changes how the part acts for out-of-bounds.
- Values:
- 0 - Part will not self-destruct from out-of-bounds.
- 1 - Part will self-destruct from out-of-bounds.
- Change Create Flag When Destroyed - This changes how the part acts upon being destroyed normally.
- Values: 0 - 63, values can be added together to combine effects.
- 0 - Default
- 1 - No items are generated.
- +2 - An item is generated.
- +4 - Small suicide bullet shot.
- +8 - Medium suicide bullet shot.
- +16 - Large suicide bullet shot.
- +32 - Big suicide bullet shot.
- Change Hit Check Flag - This changes the part's collision detection. See All Hidden Parts and Intangibility for a use of this.
- 0 - Part will not have hit detection.
- 1 - Part will have hit detection.
- Change Draw Option - Changes the way part appears/dissapears during the Delete/Phase-in effect.
- Values:
- 0 - Hides Phase-in effect.
- 1 - Shows Phase-in effect (Appear and Hide).
- 2 - Shows Phase-in effect (Normal and Shadow).
- Change Target Marker Flag - This changes whether there will be an arrow that constantly points to the specified part (useful for identifying weak spots you want the player to shoot at). If the part is off-screen, the arrow will point in the direction of the part at the edge of the screen.
- Values:
- 0 - No target arrow
- 1 - Red target arrow pointing to the part
- 2 - Yellow target arrow pointing to the part
- Stop Movement - Forces the part to Stop.
- Play Movement - Forces the part to Play.
- Stop Movement During Specified Frame - Forcibly stop a part's move action when frame equals the value.
- Move Action - These deal with the Move Actions of a part, if it has any.
- Stop Move Action - Forces a part to stop the current move action.
- Play Move Action - Forces a part to play the current move action.
- Stop Move Action During Specified Frame - Forcibly stop a part when the move frame equals the value.
- Change Move Action - Change the move action of a part.
- Change Move Frame - The move frame of a part is added, subtracted, multiplied, divided, or equals the value.
- Reset Move Counter - Reset the move frame to 0.
- Attack Action - These deal with the Attack Actions of a part. If the target part has no Attack Actions, these are useless.
- Stop Attack Action - Forces a part to stop the current attack action.
- Play Attack Action - Forces a part to play the current attack action.
- Stop Attack Action During Specified Frame - Forcibly stop a part's attack action when the attack frame equals the value.
- Change Attack Action - Change the attack action of a part.
- Change Attack Frame - The attack frame of a part is added, subtracted, multiplied, divided, or equals the value.

