Jump to content
Tiberius_161

Struggling with BIS_fnc_relPos to spawn a unit

Recommended Posts

Hello All,

 

I'm trying to spawn units on a random position using BIS_fnc_relPos..

however, Its not working for me. I'm probably overlooking something very obvious... but I just don't see it...

 

I want to spawn a vehicle (which will be a wreck later on) and then multiple civilians in a radius around it to simulate a carbomb scenario with casualties. 

 

This is what i have so far:

vic = "LOP_TAK_Civ_Ural" createVehicle (getMarkerpos _locMrk);

_spawnpos = [vic, (random 20), (random 360)] call BIS_fnc_relPos;

"LOP_Tak_Civ_Man_01" createUnit [position _spawnpos, _Grp,"victim = this", 0.2, "private"];

The vehicle spawns, but the civilian does not. The civilian does spawn when I remove the BIS_fnc_relPos line.

I have tried to replace 'position' with 'getpos'. I have also tried to use a marker (and getMarkerpos) as the reference point instead of the vehicle...

 

Can anyone give me advice on how to get BIS_fnc_relPos working? 

 

 

Thanks in advance.  

 

Cheers

Calig0la/ Tiberius

Share this post


Link to post
Share on other sites

spawnpos is already a position, you don't need to put position before it.

 

"LOP_Tak_Civ_Man_01" createUnit [_spawnpos, _Grp,"victim = this", 0.2, "private"];

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

×