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!
==Game Values== Can only retrieve Game Values for the THIS object or the ACTIVATOR object (when available). *Team (score): the score of the THIS or ACTIVATOR object *Player (score): the score of the player, but only for ACTIVATOR *Health (current), Health (max), Health (ratio) *Shields (current), Shields (max), Sheilds (ratio) *Players (current): total count of players in the game (spectators?) *Players: Team (current): count of players on the THIS or ACTIVATOR object's team (Neutral returns 0) *Teams (current): count of teams that have been in the game (in Forge it counts the teams you can see scores for) *Spawn: Order *Rounds (max) *Score To Win ===Accessing Player Game Values (Health, Shields, Score)=== Reading player numbers for any channel can be done in the Number Change, Score Change, and Spawn Order Change actions. Game Values can only be retrieved with the THIS or ACTIVATOR objects. Can't add scripts to players so they can never be THIS. But one secret is that even though the Number Check "help" text says that EXTRA gets you the object/player whose number changed, ''for Game Values (and for Object Numbers) we can choose Object=ACTIVATOR to get the object/player's Game Values. '' 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, Number Check's EXTRA, etc. The same thing applies to reading player Game Values <span style="text-size: 15px">'''Ex: Add Nav Marker To Last Man Standing'''</span> First, make all the Team 1 players constantly have their {ALIVE} player number channel set to the number of teammates alive. <pre>Timer Check 0.00 0.10 A1: Number Change Player{ALIVE} [NUMBER] Dirty=ON Set Object Count [OBJECTS] [NUMBER] Team[add]: Team 1 + Players[include] + Dead[exclude] [OBJECTS] Team[add] Team 1 + Players[include] + Dead[exclude]</pre> Next Number Check for when a player number gets {ALIVE} set to 1. Use the EXTRA[add] mod filter with Number Change to select the player to edit the their {SHIELDS} number & use Object=ACTIVATOR under Game Value to access the player's current shields value. <pre>Number Check Player{ALIVE} Equals Constant 1 A1: Number Change Player{SHIELDS} (EXTRA[add]) Dirty=ON Set Game Value=Shields[ratio] Object=ACTIVATOR</pre> Since the {SHIELDS} player number only gets updated for the Last Man Standing, you can react to that with Number Check. It should get updated every 0.10 seconds while there's a LMS so A3-A4 happen once there's not a LMS. <pre>Number Check Player {SHIELDS} Less Than Constant {75}? A1: Nav Marker Change (Players[add]) Add (EXTRA[add]) ... A2: Wait 0.20 A3: Nav Marker Change (Players[add]) Remove (EXTRA[add]) A4: ... whatever else is needed... Condition Interrupt=ON</pre>
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