Jump to content
Sign in to follow this  
keppo

Making trigger affect multiple objects

Recommended Posts

Lets say I would like to blow markers bomb, bomb2, bomb3. I would use

bomb = "Bo_GBU12_LGB" createvehicle getmarkerpos "bomb"; bomb = "Bo_GBU12_LGB" createvehicle getmarkerpos "bomb2"; bomb = "Bo_GBU12_LGB" createvehicle getmarkerpos "bomb3"

but it kinda sucks to put those everytime, especially if you have more objects.

So is there easier way to do this, like give those units one name or sumthing.

Thank you in advance and sorry, kinda hard to explain >:)

Share this post


Link to post
Share on other sites

{ bomb = "Bo_GBU12_LGB" createVehicle getMarkerPos _x } forEach ["bomb1","bomb2","bomb3"]; would be the shortened way to write it :)

I.e. run the code within the curly brackets for each element in the list, where _x is the currently looked at element.

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  

×