Home   Help Search Login Register  

Author Topic: Displaying the amount of targets  (Read 1207 times)

0 Members and 1 Guest are viewing this topic.

Offline wcrvieira

  • Former Staff
  • ****
Displaying the amount of targets
« on: 01 Apr 2007, 15:01:14 »
Hello there!

Rellikki is doing a mission and has a question that is bugging him for a while, but as he can't login I am here to ask you lads if you can help.

Let's imagine that there are five places to clear of enemies. How do I display a hint telling how many there are left to clear everytime one place has been cleared?

Thank you lads! ;)

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Displaying the amount of targets
« Reply #1 on: 01 Apr 2007, 15:16:00 »
Place a trigger per place with desired radious (enemy presence) and continuous check. Give each trigger a name. In the "deactivation" field of each trigger put:

Code: [Select]
hint format["%1 enemies left", (count list trigger1name) + (count list trigger2name) + (count list trigger3name) + ...]
Each time one trigger is deactivated (no presence of enemies) the deactivation action will be executed.

Offline wcrvieira

  • Former Staff
  • ****
Re: Displaying the amount of targets
« Reply #2 on: 01 Apr 2007, 15:55:50 »
It works perfectly, however the triggers count the amount of enemies while he wanted it to count the amount of places (the triggers)...

Thank you anyway

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Displaying the amount of targets
« Reply #3 on: 01 Apr 2007, 16:30:29 »
Then just put num_free_places = num_free_places + 1 in the deactivation field of every trigger followed by a hint shound num_free_places.
Set num_free_places = 0 in the init.sqs

Offline wcrvieira

  • Former Staff
  • ****
Re: Displaying the amount of targets
« Reply #4 on: 01 Apr 2007, 21:31:11 »
Works like a charm mate.

Thank you a lot :good: