HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Giving vision to players who have lost in arena

01-01-2004, 10:51 AM#1
Peacerich
Im working on a arena-type map game.

I made a trigger so when a player have 0 food / all his units are dead he will loose.

Now i want him to gain visibility over the arena (a region) while he is dead, and then loose the visibility when one of the remaining players win the game.

I tried making a array called var_vision and then making it like this:

When a unit dies and the owner of the dying unit has 0 food the player is out. Then i create a visibility modifier who gives vision for owner of the dying unit, and then:

set var_vision (player number of owner of dying unit) = last created visibilty modifier.

Now this causes all players who loose to gain visibility over arena, and creates a variable in the array.

When the round ends, i do like this to be gone with the visibility:

destroy var_vision(1)
destroy var_vision(2)
etc...........................

But sometimes the players doesnt loose visibility. What can be wrong?
01-01-2004, 12:09 PM#2
th15
Off the top of my head id suggest disabling the visibility modifier insteadof destroying it. Ive not tested this so icant guarantee that im correct.
01-01-2004, 01:59 PM#3
Peacerich
Haha yes i just changed it into that before reading this=)

I create the visibility modifiers in start, then enable/disable them during battle.

thx alot though=)