Static Weapon Spawning Technique
This technique enables static weapon spawning in a game using only three timers and one weapon spawn. The respawn time can be set to any desired value.
Follow these steps to implement this technique:
- Timer: On Once: Broadcast Channel 0, Timer/User Data 10
- Timer: On: Power Channel 0, Broadcast Channel 1, Timer/User Data x (substitute x for your desired weapon respawn time in seconds)
- Timer: Off Once: Power Channel 1, Broadcast Channel 1, Timer/User Data 1
- Weapon of Choice: Spawn Time Never, Place at Start True, Max Count 16, Spawn Channel 1, Can Despawn False
The first Timer On Once is to kick off our other timer once the game has started, allowing 10 seconds for the Deploying countdown. The Timer On is our looping timer that turns on channel 1 every time your weapon is set to spawn. The Timer Off Once turns off our spawning channel a second after it's been turned on, essentially resetting our looping timer.
The weapon we want to spawn has spawn time set to never, so it is only spawned in by the scripting. It's set to place at start true (not false) because we want it to spawn in at the beginning of the game, ignoring our spawning channel at the beginning. Its Max Count is at 16 so that whenever our respawn time expires, another one will spawn in regardless of whether a player is already holding one equipped. Finally, we setup its Spawn Channel to 1, and its Can Despawn is set to false (not true) because we don't want to force-despawn the weapon when we turn the channel back off again a second later.
Please note, the weapon will only respawn if the previous one has been picked up. This won't affect the timers, but it means it will skip-over that spawn because the weapon hasn't moved. If you want the next one to spawn in, regardless of whether the previous one was picked up (and thus stacking them on top of each other), then you need to Drop Spawn the weapon, so that the next one has space to spawn in even if the previous one is still sitting there.
Here's a video walkthrough of the process: link
Contributors
buddhacrane
Captain Punch