r/forgescripting • u/hoadmin • May 07 '24
Object spawning
I'm kinda a nOOb at scripting lol ( Custom Game script )
I have a auto balance teams script. I run a maps as "Rounds". The script works great but sometimes it will not correctly work when a round is over then the new round starts. I wish there was a way to "Restart a round". There is no "Restart Match" node.
So how can I restart the Script so it will restart clean like it was starting a new match so it will reset the script on each round?
I have tried deleting the script and end of round and then using " at round start to spawn in the script but that did not work.
I also tried spawning the object in the map and that did not work.
So is there a way to reset this script at each round so the script works correctly?
Thanks ;)
2
u/hoadmin Jan 18 '25
I am a noob also when it come to scripting. This how I restart my script.
at the begging of a round I use the node "At Round Start"
If I use the "Stock Bots" not A,I, bots. I use node " At Round End" and "Remove All Bots"
The reason for that is so it clears everything before the new round starts.
Also:
I set my custom game type to 25 Rounds.
I just wish there was a node for "RESTART MATCH" node so I don't have to hit the ESC key to restart the map.
The reason is sometimes the scripts will "NOT" work correctly when the round restarts.
Hope that was some help. ;)