HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Argh...map trouble...

07-07-2002, 11:14 PM#1
dataangel
I'm trying to setup "life points" on my map. It's an area where the unit walks onto, and if they stay in the area for twenty seconds, they're fully healed. So I have two triggers like this:

Event
Unit enters region Life Point 1
Condition
Unit is a hero (only for heroes)
Action
Set Stillhere[Player number of(Owner of (Triggering Unit))] = True
Wait 20 seconds
Pick all units in region Life Point 1 and if (picked unit) = (triggering unit) and Stillhere[Player number of(Owner of (Triggering Unit))] = True then Set Life of Triggering Unit to 100%

Event
Unit leaves region Life Point 1
Condition
Unit is a hero (each player only has 1 so this is safe)
Action
Set Stillhere[Player number of(Owner of (Triggering Unit))] = False

2 problems:

1. Just plain doesn't work. I have no idea why, I've tried a bunch of stuff to no avail.
2. If it did, I'd still have the problem that they could walk off for 5 seconds, and then come back before 20 seconds was up. I have some ideas on how to fix this though. #1 is the real problem :p


Also, I have a trigger setup so that when a unit kills another it creates a special effect on the killing unit. No matter what I do, the special effect doesn't play the first time a unit is killed. Everytime after that it does play though. Any ideas?
07-08-2002, 02:00 AM#2
DryMaltExtract
Instead of doing True/False have it add up a number.

So it could go like this:

Unit enters area
<your conditions>
add 1 to the counter variable
set a unit variable to the one that entered the area
wait 1 second
and have it trigger the 3rd trigger i've written

unit leaves
reset the count variable to 0

<no events>
condition: boolean comparison: variable guy is in region equal to true
if statement: if variable = 20 then variable guy's life goes to full
add 1 to the variable that stores the time
wait 1 second
have this trigger run itself checking conditions

All the variables I used would be array variables accessed the same way you used the variables you made. (playernumberof = ........... ). Thankfully you said it is limited to 1 hero per person or we'd be screwed using our ways =\