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!
==Player Scope Numbers== Player Numbers are the most unique type of Numbers. They're powerful but a bit harder to use. Player {alpha} is the only Number Variable that can use ''every'' Number function. Player Numbers can trigger Number Check while players are on the map, alive or in the dying animation. <span style="text-size: 15px"> '''Amount of Number Variables and Channels'''</span> *<span style="text-size: 15px"><span style="text-size: 15px">26 Player Number Channels, {alpha} thru {zulu}</span></span> *<span style="text-size: 15px"><span style="text-size: 15px">There's an instance of every {channel} for every player, so up to 416 (26 channels x 16 players) unique Player Number Variables</span></span> *<span style="text-size: 15px"><span style="text-size: 15px">For each player, there's 1 instance/variable for each {channel}, 26 NumVars per player</span></span> *<span style="text-size: 15px"><span style="text-size: 15px">For Number Check, there's no way to select specific players, so each {channel} is effectively shared for all players, meaning that a from Number Check's view, each Player {channel} can have up to 16 unique values at a time</span></span> *<span style="text-size: 15px"><span style="text-size: 15px">For Number[inc/exc] mods, there's 1 NumVar for each player, the {alpha} channel, so up to 16 filterable player NumVars</span></span> <span style="text-size: 15px"> ===Reading Player Numbers=== Reading player numbers for any channel can be done in the Number Change, Score Change, and Spawn Order Change actions. These options must be used: Source=Number, Scope=Object, Object=ACTIVATOR, Number=Player and finally pick a specific channel. Since Object=ACTIVATOR, the only options (conditions) that make players available as this ACTIVATOR are Boundary Check + Number Check (EXTRA qualifies as this ACTIVATOR, undocumented ) Since only 1 player's number can be read at a time + we don't control which player is selected as Object=ACTIVATOR, to read a specific player's number, we need to isolate that player by making sure they're the only one in Boundary Check's ACTIVATOR or Number Check's EXTRA. All objects can hear Player Number Checks trigger for all situations, except the usual: Number Check Scripts with Always Runs=OFF when object is despawned are never heard/triggered. </span> If you use Number Check to check a player number against that same player number, for example when Player alpha 1 is equal to Player alpha 1, it compares every player to his own number and will change when that number is dirtied. "Less Than" and "Mor Than" do nothing. This is different from Team Numbers, which will compare against all other teams. <span style="text-size: 15px"> ===Player Number Mods=== *<span style="text-size: 15px"><span style="text-size: 15px">Each Player Number Variable is associated with 1, and only 1, player... For example, one player's {barvo} is separate from any other player's {barvo}... However, Number Check conditions can specify a {channel}, but has no setting to let us choose a player</span></span> *<span style="text-size: 15px"><span style="text-size: 15px">Only the {alpha} channel is filterable with the Number mods... the Number[inc/exc] mods have no way to choose a {channel}</span></span> *<span style="text-size: 15px"><span style="text-size: 15px">Number Check populates the EXTRA[add] mod with all players whose NumChan passed the test</span></span> <span style="text-size: 15px"> ===Player Numbers and Game Values=== (the difficult/annoying part) </span> *<span style="text-size: 15px"><span style="text-size: 15px">The Number Change action can change multiple Player Numbers</span></span> *<span style="text-size: 15px"><span style="text-size: 15px">Number Change, Score Change, and Spawn Order Change actions are able to read only 1 Player Number or Game Value</span></span> *<span style="text-size: 15px"><span style="text-size: 15px">The script's condition must populate the ACTIVATOR or EXTRA mods so that the Object setting becomes available, allowing ACTIVATOR (1 player) to be chosen instead of THIS (object with the script)</span></span> *<span style="text-size: 15px"><span style="text-size: 15px">Interacted, Message Received, Power Check, Number Check, and Boundary Check make Object=ACTIVATOR available</span></span> *<span style="text-size: 15px"><span style="text-size: 15px">Boundary Check's ACTIVATOR mod is used for Object=ACTIVATOR, the EXTRA mod is not</span></span> *<span style="text-size: 15px"><span style="text-size: 15px">Message Received and Power Check simply pass along the ACTIVATOR (player) passed to them... They can't make the player available as ACTIVATOR on their own</span></span> ''Learn more in the Accessing Player Game Values section.'' ===Player ID Mechanisms=== Assigning players IDs might not be necessary for many cases as we can easily select players with EXTRA[add] after dirtying any player number. <span style="text-size: 15px">'''2-Script Increasing Number Player ID Assigner'''</span> General Explanation The Brain's # is the next ID assigned. This uses Force Dirty on a player's {alpha} # (which is 0) to activate Script 1's Number Check: Player {alpha} = 0 condition. When there are no players with ID still 0, Script 1 doesn't trigger. Script 2 initializes THIS Brain's # to 1, which will be used for the first ID. Every second, it also checks if any players don't have an ID yet ({alpha} = 0), which starts the process of assigning a player ID. It marks any 1 player's {alpha} # that's 0 as dirty to trigger Script 1. Script 1 does the assignment with THIS Brain's current #, increments that #, and then checks if any players still don't have an ID, which creates a loop that assigns one player ID each game tick until there are no players without an ID. Script 1 Description When Player {alpha} changes to = 0 (or set dirty) A1: Change 1 player's (with ID still 0) {alpha} # to THIS Brain's # A2: Increment THIS Brain's # by 1 A3: Mark 1 player's (with ID still 0) {alpha} # as dirty, but don't change it Script 2 Description Every 1.00 second (Use whatever timings you need) A1: Mark 1 player's (with ID still 0) {alpha} # as dirty, but don't change it A2: Initialize THIS Brain's # to 1 if its number is 0 '''Script 1''' <pre>Number Check: Player {alpha} = 0 A1: Number Change: Player [NUMBER] {alpha} = THIS Number [NUMBER] Players [add], Number [include] 0, First 1 A2: Number Change: Object [THIS] Increment 1 A3: Number Change: Player [NUMBER] {alpha} Increment Force Dirty 0 [NUMBER] Players [add], Number [include] 0, First 1</pre> '''Script 2''' <pre>Timer Check: 1.00 1.00 A1: Number Change: Player [NUMBER] {alpha} Increment Force Dirty 0 [NUMBER] Players [add], Number [include] 0, First 1 A2: Number Change: Object [NUMBER] Set 1 [NUMBER] THIS [add], Number [include] 0</pre> ===More Information on EXTRA and ACTIVATOR=== ''Check the discord Player Tracking etc channel for the most current info'' *When using Number Check's EXTRA mods & Number/Score/Spawn-Order Change's Object=ACTIVATOR with player numbers, they return all players whose number changed in one clump *The EXTRA mods give us all players in one chunk and Object=ACTIVATOR only returns one player number, so using Number Change Set to assign Object=ACTIVATOR to EXTRA [add] won't copy the players' numbers individually, they all just get one random player's number *Number Check triggers when a player is dead, but the EXTRA mods and Object=ACTIVATOR don't give you the player, even if you Wait until they respawn... the EXTRA/ACTIVATOR references are always invalid *Numbers can be assigned or changed for dead players and that will trigger Number Check *EXTRA and ACTIVATOR don't seem to work once a players body is gone... the action target mods generally need objects/players on the map (dead or alive) to work (verified when using Number Check, need to test when using Boundary Check and Message Send/Power Set)
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