Staredit Network

Staredit Network -> UMS Assistance -> Help with using Countdown Timer
Report, edit, etc...Posted by Hellgiver on 2006-04-13 at 05:09:02
I am making a simple map for a friend and me. I want to make it so that every time the person's hero unit dies, the countdown timer counts down for 2 game minutes and then the hero is respawned. It is so simple, yet I have no idea what to do. Any help would be greatly appreciated.
Report, edit, etc...Posted by Foley on 2006-04-13 at 05:46:25
hmm, lemme see.

if it maps is with only one hero per player, so it can be:

conditions:
player 1 command exacly 0 <hero unit here/any unit>
actions:
*display text message: You died. Respawning in 2 minutes.
wait 120 seconds(or 120000 miliseconds)
create 1 <hero unit> for Player 1 at <spawn location name>
*Display text message: You're respawned.
*Center wiev at <spawn location>



* = optional, not needed

as well it is without the countdown timer but ah well it works smile.gif
Report, edit, etc...Posted by Urmom(U) on 2006-04-13 at 10:59:30
Current Player commands exactly 0 Hero Unit
Switch 1 is Cleared
------------
Set Countdown Timer to 180 Game Seconds
Set Switch 1
Preserve Trigger



Switch 1 is Set
Countdown Timer is exactly 0 game seconds
------------
Clear Switch 1
Create 1 Hero at location
Preserver Trigger


Now let me explain. When the player's hero dies, then he won't have one anymore and that is why you can use the Command condition. I used a switch because I needed a way to clear the trigger and still have it preserved. Otherwise it would just continuously set the countdown timer to 2 minutes. Then in the second trigger, I have it so that when the switch is set (because if it wasn't, the trigger would run forever) and the countdown timer is 0, you can create the unit and clear the switch which would start the whole process over again if the hero dies. Also, on Fastest, 180 game seconds equal 2 real minutes (120x1.5).
Report, edit, etc...Posted by BeeR_KeG on 2006-04-13 at 11:22:42
I too, used to have lots of problems using Countdown Timers, so I devised a new way to still have my countdown timer.

You'd need to first figure out how much 1x1 spaces does an observer travel in 2 minutes. If the map is too small to have that much space you can either divide up on two 1 minute travels or four 30 second travels or make up a path that takes 2 minutes.
The speed list is here: http://www.staredit.net/index.php?tutorial=161

Now that you know how much distance an observer travels in 2 minutes, you need the triggers for the Physical Timer itself.


Trigger
Description:
Physical Timer Start
Conditions:
¤ Current Players Commands 0 Hero
¤ Switch 1 Clear
Actions:
¤ Create an Observer at Location 1
¤ Move Observer at Location 1 to Location 2
¤ Set Switch 1
¤ Preserver Trigger



Trigger
Description:
Physical Timer End
Conditions:
¤ Current Player Commands 0 Hero
¤ Switch 1 Set
¤ Current Player brings 1 Obeserver to Location 2
Actions:
¤ Remove all Observer for Current Player in Location 2
¤ Create 1 Hero at Location X
¤ Clear Switch 1
¤ Preserver Trigger


There you have it, a simple Physical Countdown Timer in 2 triggers. I used the seting and clearing of Switch 1 to prevent the triggers from continously fireing. The good thing about this is that you can have multiple physical countdown timers and waits running at the same time without screwing up, it's also simple and easy to make. You can simply use another player, switch or combination of switches or other air units to make more of these timers.
Report, edit, etc...Posted by Urmom(U) on 2006-04-13 at 12:43:57
That can take up unessesary space in his map though. tongue.gif
Also isn't 100% accurate.
Report, edit, etc...Posted by XMercury on 2006-04-13 at 13:36:15
If you ask me, you are best to listen to urmom. I'm an experienced map creator, and urmom's description is pretty much perfect.

As for Beer_Keg, sorry man, but thats really nooby triggering. You should read urmom's post.
Report, edit, etc...Posted by BeeR_KeG on 2006-04-13 at 14:34:59
QUOTE(urmom @ Apr 13 2006, 12:43 PM)
That can take up unessesary space in his map though. tongue.gif
Also isn't 100% accurate.
[right][snapback]464454[/snapback][/right]


What space? Observers and locations don't take up space, I did it right in the middle of the map where players where playing and hardly anyone notices a blur flying around.
The drawback is that your time is off by the time it takes to fire an action, which can be fixed by shortening the distance by one or two squares.

QUOTE
If you ask me, you are best to listen to urmom. I'm an experienced map creator, and urmom's description is pretty much perfect.

As for Beer_Keg, sorry man, but thats really nooby triggering. You should read urmom's post.


QUOTE
I am making a simple map for a friend and me.


The map creator isn't the msot advanced, so it's best to give him something that he has a higher chance of working on the first try. And as for nooby triggering, there's no such thing as nooby triggering, as long as it works you're fine.
The less waits and countdowns in your map, the less your times will screw up.

I believe nobody has seen the problem with countdown timers in here. What if several heroes die in less than 2 minutes? Your timer will go way above 2 minutes.
Report, edit, etc...Posted by Foley on 2006-04-13 at 17:19:01
...i still think mine's better ! smile.gif (did i added "preserve trigger" there?)
Report, edit, etc...Posted by Urmom(U) on 2006-04-13 at 19:06:33
QUOTE
What space? Observers and locations don't take up space, I did it right in the middle of the map where players where playing and hardly anyone notices a blur flying around.

Usually people set aside areas for the game engine triggers because they don't want any interference at all and that's what I was refering to.

QUOTE
As for Beer_Keg, sorry man, but thats really nooby triggering.

Don't be harsh to Beer_Keg, he's the man!
Next Page (1)