Forum Jump :

Author Message

HeXeY  



Posts: 2
Rank:


Level: Member

Country: no
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2012-08-09 20:56        
     
Hoy chaps!

New here and been lurking for quite a time, but I need some help, so I've decided to come out of the shadows!

Thing is, I'm currently making a mission where I want to have some replayability (is that even a word?), and as such, I have placed 3 UAZ'. Each with it's own waypoints and triggers and stuff, having different enemies appear, from different directions based on which UAZ spawns. Thing is, I have no clue on how to have just one of them spawn, not 2, 3 or none at all. And it has to be random.

I've tried searching, but with no results on how to do specifically what I want.

Appreciate all help I can get,

HeXeY


Author Message


Posts: 1475
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2012-08-09 22:05        
     
try this

place three vehicles name them v1,v2,v3

then place this in a game logic init

veh= [v1,v2,v3];del = floor random (3);veh = veh-[veh  select del];{{deleteVehicle _x;} forEach (crew _x);deleteVehicle _x;} forEach veh;


it randomly removes one vehicle from the array then deletes the remaining two vehicles and crew from the map.


Advertisement


Author Message

HeXeY  



Posts: 2
Rank:


Level: Member

Country: no
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2012-08-13 17:57        
     
Seems to have worked, much appreciated :)