Home   Help Search Login Register  

Author Topic: MP Firing Range Script Assistance  (Read 1618 times)

0 Members and 1 Guest are viewing this topic.

Offline Evan Scown

  • Members
  • *
MP Firing Range Script Assistance
« 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.
« Last Edit: 12 Jul 2007, 12:13:25 by Evan Scown »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: MP Firing Range Script Assistance
« Reply #1 on: 12 Jul 2007, 12:44:43 »
Try this:

Code: [Select]
(call (compile (format["M%1", ceil (random 30)]))) setDamage 0;

Offline Evan Scown

  • Members
  • *
Re: MP Firing Range Script Assistance
« Reply #2 on: 12 Jul 2007, 13:19:39 »
Ahh, much thanks :D that worked first time. :good: :good: Double thumbs up :D