OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: Evan Scown on 12 Jul 2007, 12:11:01
-
Hello,
It's been quite sometime since I'd visited OFPEC and I hope to yet again tug on your guys coat's to ask a question. I'm currently working on a Clan Firerange Training Mission, in it I would like the ability for the instructor, via an AddAction script to reset a random target on the course. The model used would be the blue TargetE's that are default laid out with no heath so that they are down *not dynamically created* assuming that there are 30 objects placed in mission editor and they start with the prefix M and end with a number, is there a way to get a script to pull randomly a number (1-30) and use that random value to raise target "M#".
Any and all assistance would be greatly appreciated :D
Kindest Reguards.
-
Try this:
(call (compile (format["M%1", ceil (random 30)]))) setDamage 0;
-
Ahh, much thanks :D that worked first time. :good: :good: Double thumbs up :D