Editing
Games:Halo 5: Guardians/Forge/Scripting/4. 'Numbers'
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Number Gotchas== *If you change a number several times in Actions that all trigger in the same Condition, only the last number change will trigger subsequent Number Check Conditions that check for that number. *Be careful: even if that last number has dirty off, the number was dirtied because of the other number changes. *If the Number Change Decrement is done inside one of the Number Check scripts of the same NumVar then it'll change it before later scripts can check the NumVar's original value So if the value was changed to 0 last tick, all Number Checks looking for 0 will trigger up until the one that decrements it, then the rest see -1 as the value If multiple Number Check scripts (like > 0) decrement the NumVar, then it's possible to skip over specific number values *Comparison Number Checks such as those using Greater Than/Less Than may not work if one of the numbers being compared hasn't had a number change yet *Actions generally can't read numbers to use as inputs like XYZ coordinates, health amounts, etc *Object scope Number Check conditions can only be triggered for scripts that belong to the object whose number changes *Numbers can be written to several times by actions during the same game tick and the Number action target filters can immediately return different results, so the order is important for scripts that change and/or test numbers *Conditions seem to all be checked to see if they need to be evaluated and only the ones that do get sent to the "Action Phase" to be evaluated and execute if the condition passes and their Actions are then run *For Number: Check as long as the Number being checked has changed or is marked Dirty, it will get sent to the "Action Phase" to be evaluated in the order of older script first (lowest number). Each script is fully evaluated and its actions executed before moving to the next one. This means that if a Number is Dirty but wouldn't pass a script's condition at first, but an earlier script changes that Number so that it now would pass the later script's Number: Check condition, that later script (which seems like it wouldn't trigger) does trigger and the Actions are executed. *Global and Team numbers don't have any spawnable objects associated with them, so they can't be used within action target filters (only objects spawned on the map get returned by the filters) *The Number mod filters don't have a channel setting, so the player {alpha} channel is the one that filters work with (objects only have 1 number so no channels to select) *The Number [include/exclude] filters seem to only accept numbers from 0 to 64, so the other Number filters will generally be more useful *Boundary Check: ACTIVATOR returns the object only when it enters or exits the boundary (no longer continuously returns objects inside a Continuous Boundary), EXTRA returns all the qualifying objects (based on the Filter and object's Team settings) within the boundary *Number Check does not have an ACTIVATOR object, but the Object setting with the ACTIVATOR option does appear when Number/Object or Game Value is selected for the Source property, and ACTIVATOR represents the EXTRA object for this case (this is how to get player/object scope numbers, health, shields, scores, etc) *When objects are despawned, you can't change their number (likely because action target filters don't return despawned objects) *Number Check scripts for the object number won't trigger when despawned, unless the number is compared to another number that has changed *Object numbers are saved while the object is despawned, so when it's respawned the number will be the same as before *Object numbers are saved between rounds *Most, if not all, properties that are set in the Properties Window are reset to their original values when the object is respawned *An object's Number is available for reading and writing after calling Spawn, but Despawn makes it inaccessible again. This works even during the same game tick. *Player Numbers can trigger Number Check while players are on the map, alive or dead *Despawned objects seem to ignore Number Checks for Team Numbers. Setting the team to Neutral didn't work. Setting the despawned object to the same team didn't work. So we can't use Team Numbers to signal objects to spawn themselves. *Team Numbers for teams that aren't in the game still seem to work in general, so there's plenty of global-like numbers available in those (be sure to have an object spawned on the map set to that team if you specify the team with action targeting - like Team [add] Team 6)
Summary:
Please note that all contributions to [DEV] Forgehub Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
DEV Forgehub Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Games
Discussion
English
Views
Read
Edit
View history
More
Search
Games:
Halo 2: Anniversary
Forge
Guides & Tutorials
Frame Rate
Static Weapon Timers
Scripting
Sandbox
Vehicles
Weapons
Halo 3
Forge
Forge Canvases
UI & Controls
Spawning
Match Making
Official Maps
Community Maps
Sandbox
Weapons
Equipment
Vehicles
Halo 4
Forge
Forge Canvases
Lighting
UI & Controls
Spawning
Matchmaking
Official Maps
Community Maps
Sandbox
Game Modes
Weapons
Armor Abilities
Vehicles
Ensuring Level & Game Mode Compatibility
Halo 5: Guardians
Forge
Audio
FX Objects
Forge Canvases
Lighting
Scripting
1. Conditions
2. Actions
3. Mod Selection Filters
4. 'Numbers'
5. Scripting Gameplay Elements
6. Resources for Scripters
7. Video Tutorials
UI & Controls
Spawning
Matchmaking
Official Maps
Community Maps
Action Sack
Big Team Battle
Breakout
Community Doubles
Community Slayer
Extermination
Ghost in the Shell
Grifball
Halo 1 Anniversary Throwback Playlist
Halo 3 Classic Throwback
Halo Championship Series (HCS)
Head to Head
Husky Raid
Infection
Mythic Arena
ODST Slayer
Roaming King
Social Slayer
Sandbox
Weapons
Spartan Abilities
Vehicles
Halo: Infinite
Forge
Audio
FX Objects
Forge Canvases
Lighting
Scripting
UI & Controls
Spawning
Matchmaking
Official Maps
Community Maps
Sandbox
Game Modes
Weapons
Equipment
Vehicles
Custom Game Editor Options
Halo: Reach
Forge
Forge Canvases
Object Tagging
Tagging Chart
Unorthodox Tagging
UI & Controls
Spawning
Sandbox
Game Modes
Weapons
Armor Abilities
Vehicles
Visual Aides for each Game Mode
ForgeHub:
Game & Level Design
Level Design
Multiplayer Level Design Fundamentals
Games
Support
Getting Help
Wiki Index
Tools
What links here
Related changes
Special pages
Page information