Editing
Games:Halo 5: Guardians/Forge/Scripting/5. Scripting Gameplay Elements
(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!
==Scripting and Match Rounds Gotchas and Fixes== Starting in round two, some Conditions will not work or will not work correctly at the beginning of rounds. The reason seems to be that objects don't truly respawn once a game has loaded. For example, after a match starts the When Spawned Condition doesn't work correctly at the beginning of successive rounds. And, when using the trick below to get objects to despawn after a round ends, the object remains despawned after the next round starts. A workaround for scripts that won't work at Round Event:End that I found is to use an Action that sends a message, then trigger your script when that message is received. This seems to bypass the interruption that Round End causes to scripts. It works for information scripts, like number changes and spawn/despawn, but has not been tested on move scripts yet. Round and Condition interrupt must be off on both the message send and the script receiving it, and since objects don't truly respawn on rounds, if you use this trick to despawn an object at the end of a round it won't be there on the next round. You can get it to spawn in by using the Round Event:Start Condition. Switching to Round Event:Start is another way to get around the Spawned Condition weirdness on rounds. But there is a weird bug with Global numbers when working on Static Weapons where they might not work. The fix for this is to turn Force Dirty ON, even if they've already been dirtied by a number change. Though they don't truly respawn on rounds it's possible objects "load" twice during the transition for rounds, and this is why Force Dirty must be on. For some reason, this doesn't happen with object numbers. It hasn't been tested with Team numbers. Round weirdness doesn't just affect our scripts. When using the ball spawn object, the sportsball spawns in fine first round, but in successive rounds can glitch, repeating the ball incoming over and over. During testing to see if we could find a workaround, Yumudas noticed that it only happens if the ball is on the field when round ends. Making sure the sportsball is destroyed or despawned before the round ends prevents this from happening every time.
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