Jump to content
Sign in to follow this  
-Snafu-

The Unsung Random Trap Spawn

Recommended Posts

I'm trying to spawn a number of traps from The Unsung mod in a certain radius from an empty marker or object. I've been trying to figure this out for myself and using a tutorial from BIS I have got this so far but it doesn't work and I am not sure why.

Ultimately what I am aiming for is just to fill an area with these traps so players are kept on the edge.

if (isServer) then

//Array of traps
_trapArray =
[
"uns_Tripwire1b",
"uns_Tripwire2b",
"uns_m16apmine",
"uns_Punji1",
"uns_Punji2",
"uns_punji3",

]

// select random trap
_trap = _trapArray call BIS_fnc_selectRandom;

// spawn the trap
_trapSet = _trap createVehicle position trp;

trp is an invisible heli pad. I'm calling the script with _nil = [] execVM "trapSpawn.sqf";

It's probably something obvious but I just can't seem to my head around this stuff - help appreciated!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×