• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Level Design How to spawn random weapon when triggered

In the Abusement Park map there is a robot that dances if you throw money into a box. This gave me an idea, is it possible to spawn a random weapon when you throw money into the box?
I have been experimenting with triggers to figure out how to get this to work. In the scripted trigger properties --> AIScript, my actions are: WAITFOREVENT-random, SpawnActor-KFRandomItemSpawn, GOTOACTION-0. I then tested the map and nothing happens when the event starts. I went back to SpawnActor and changed it to SpawnActor-DeaglePickup, tested map again and the deagle spawned. If KFRandomItemSpawn doesn't work is there a way to list all weapons and randomly spawn one of them?
 
Last edited:
KFRandomitemspawn not always spawns, because it depends on difficulty level, but I know a method could helps you out.

fo4208.png



You can see I added ACTION_TriggerRandomEvents to trigger 1 of possible events. Then I added more scripted triggers with different tags from possible event and spawn different weapons you want.
 
Upvote 0