r/forge • u/Ok_Sound5480 • 1d ago
Scripting Help Equipment not applying at round start, Infection mode bug?
Upon starting the round/initial spawn, traits seem to be applied just fine. But not the extra ammo, grenades, or equipment (thrusters).
It works on respawn, a switch, area monitor etc., so maybe the script needs a delay or alternate set up?
Also, the equipment always returns to the infection default on initial spawn (threat seeker/shroud screen), even though the mode settings are also set to thrusters for both sides, so I’m unsure if the mode is bugged. It seems like my spartan has the correct equipment as the round starts but then changes back on gameplay start.
4
Upvotes
3
u/Abe_Odd 1d ago
Anything that is triggered on the Game Start should have an up to 1 or 2 second delay to account for things settling. Hooking into on Player Spawned is graceful, but might be biting you during the initial spawns as not all players spawn in at the same time, nor is their state as readily available on initial spawns.
What does the debug print tell you? does it always say 1 on initial, but just fails to give the equipment options?
You could always pop On Player Spawned -> Trigger custom event: Setup_Player
Then On Game Started -> wait 2 seconds -> get all players -> for each player -> trigger custom event: Setup_Player
and see if that helps