Home   Help Search Login Register  

Author Topic: Revealing unit positions in real time.  (Read 640 times)

0 Members and 1 Guest are viewing this topic.

MikeSc

  • Guest
Revealing unit positions in real time.
« on: 05 Nov 2002, 10:16:42 »
For one of the missions I'm creating I need to have the location icons of every enemy soldier displayed on the map in real time -- regardless of whether the player knows about them or their position.

Anyway, I've got the array with all the enemy units, and I figured I could just run the following bit of script:

"playerguy reveal _x" forEach enemylist

This works but it only displays the location of the units when the code first ran (i.e. if the enemies are moving around their positions aren't updated in the map screen).

I tried throwing the code in a constant loop that runs in the background every half second but this doesn't work either (it just keeps showing the initial enemy position, not the updated one).

So how do I get realtime unit position info to show up on the map screen?
~Mike

Bremmer

  • Guest
Re:Revealing unit positions in real time.
« Reply #1 on: 05 Nov 2002, 10:46:04 »
Couldn'y you just run a scripted loop that runs yuor command every second or so?

eg.

#loop
~1
"player reveal _x" forEach enemylist
goto "loop"

Also remember that unit markers don't show up in veteran mode (and by default in the mission editor).

 :)

MikeSc

  • Guest
Re:Revealing unit positions in real time.
« Reply #2 on: 05 Nov 2002, 16:40:31 »
Hi Bremmer,

Yep, I tried the loop, but it won't update the unit positions, it just keeps displaying the initial position.

Basically I just need a way of indicating the positions of enemy units on the map so that the player can seek them out (instead of blindly hunting for them). Any way that will work is fine. :)

Thanks,
~Mike