odium 12 Posted August 13, 2013 Hi guys, acutally I'm working on a train module for my clan and I need some help. So far I placed a few hundred units in a city at specific positions and I want to to spawn about 10% of them. So someone made me this: null = [] spawn {{if (side _x == East) then { if (round(random 100) > 10) then { deleteVehicle _x; };}} forEach allUnits}; Works pretty good for the whole side east. Now, how can I change this line into something, that vehicles and their crews are not affected by this. By now, my only workaround is to place IND-Vehicles. Any idea? I know, there is something like TYPEOF but actually I'm not so good at this ^^ Greetings and thanks in advance, Odium Share this post Link to post Share on other sites
xxanimusxx 2 Posted August 13, 2013 Something like this should do the trick: null = [] spawn { { if (side _x == East && vehicle _x == _x) then { if (round(random 100) > 10) then { deleteVehicle _x; }; } } forEach allUnits; }; Share this post Link to post Share on other sites
Foxy 1 Posted August 13, 2013 For infantry only: null = [] spawn {{if (side _x == East && _x isKindOf "man") then { if (round(random 100) > 10) then { deleteVehicle _x; };}} forEach allUnits}; EDIT: ninja'd Share this post Link to post Share on other sites
odium 12 Posted August 13, 2013 Works, thank you =) Share this post Link to post Share on other sites