Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: MP Firing Range Script Assistance  (Read 2491 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