Jump to content
Sign in to follow this  
1para{god-father}

Random Smoke with markers

Recommended Posts

I am trying to get a Random Smoke to pop , so I have placed 5 markers on the map , and wanted them to be a random selection so far :-

_markers = ["m1", "m2", "m3","m4","m5"];
_pos = (getMarkerPos (random _markers));
_BlueSmoke = "SmokeShellBlue" createVehicle position _pos;

Where am i going wrong ?

Share this post


Link to post
Share on other sites

_mrk = _markers select (floor random count _markers);

_pos = getmarkerpos _mrk;

Share this post


Link to post
Share on other sites

Thanks,

I am getting "Expect Object location" or something like that in the error ?

_markers = ["m1","m2","m3","m4","m5"];
_mrk = _markers select (floor random count _markers);
_pos = getmarkerpos _mrk; 
_BlueSmoke = "SmokeShellBlue" createVehicle position _pos;

Share this post


Link to post
Share on other sites

Should be:

CreateVehicle _pos

Also a marker pos does not have a z location so make sure you set it to 0 for the create vehicle command.

[_pos select 0,_pos select 1, 0]

Share this post


Link to post
Share on other sites
Should be:

Also a marker pos does not have a z location so make sure you set it to 0 for the create vehicle command.

[_pos select 0,_pos select 1, 0]

Not true, getMarkerPos returns [x,y,0] always.

Ive used it countless times in terms of spawn points.

http://community.bistudio.com/wiki/getMarkerPos

Returns the position of a given marker. [x,y,z]

Argument 3 (height above ground) is always zero.

If a non-existing marker is referenced the values returned are [0,0,0].

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  

×