Staredit Network > Forums > SC1 UMS Theory and Ideas > Topic: Creating Multiple Timers (Not using Wait)
Creating Multiple Timers (Not using Wait)
Nov 18 2007, 5:07 pm
By: MTROUT  

Nov 18 2007, 5:07 pm MTROUT Post #1



How to make special abilities in RPG maps that utilize multiple Duration Timers and Cool Down timers with no wait triggers.

When trying to create a special ability for a character that requires a specific duration the obvious first thought might be to use a wait trigger. However, in practice in a complicated map this will cause too much interference with other triggers making it impractical especially in multiplayer enviroment. While there are various ways around. This technique is even more value able when your dealing with multiple different special abilities all being activated at the same time each with different potential timers. This can also be used to make a cool down timer if you want time between spell casts that do not have a duration themselves.

For example. You want a spell that creates 2 Ultralisks at a location around the player that lasts for 15 seconds.


Duration Timers using Spider Mines:
Simply put the method uses Spider Mines created a specific location to act as a timer exploiting the fact that they will stack indefinately in one spot even for multiple players.

Example of how to do it
Create a location the spider mine will be made. "Timer1"

Trigger 1: This activates the timer
Condition: switch 1(Activate Mines)
Action: Create 1 spider mine at "Timer1" for p1 (thus creates one every second or so)
Preserve Trigger

Trigger 2: This disables the timer
Condition: switch 1(Activate Mines) is cleared
Action: Remove all spider mines at location "Timer1" for p1
Preserve Trigger

Trigger 3: Trigger that does your abilities
Condition: Up to you
Action: Create 2 Ultralisks for player 1 at location X
set switch 1(Activate Mines)
Preserve trigger

Trigger 4: Trigger that ends the timer
Condition: Switch 1 is set
Player 1 brings at least 15 spider mines to location "Timer1"
(additional conditions depend on trigger 3 conditions)
Action: Remove all Ultralisks for player 1
Clear switch 1 er (this then removes all mines)
Preserve

Thus now you can apply this to any special ability, if you want to have multiple special abilities with timers
going off at the same time you can either create another location for that timer OR use a different player to create the spider mines at the same location (all will stack). In my map I use the 4 computer players mines and one location per player character to do all the timers.

Note: This only works for short durations like under a minute else your building just too many units on the map.

To add a cool down timer takes it a step further but is essentially the same idea. The way I did it was easy.
To activate a special ability you build a shuttle from a robo facility (you have 4 robo facilities each that trigger different things). Thus to prevent a player from activating a spell onces its been cast till the end of the duration, or just as a cool down till you want them to use it agian do the following.

Once the player has brought the shuttle to the location, give the building to a computer player thus the player can't activate it agian (note: you WON'T loose your hot key). Start a timer as mentioned above, and when the timer is up give the player back the building.

If you would like to see more examples and the actual triggers you can see how I did it in the demo version of my map in this thread http://www.staredit.net/?topic=1229

Hope this is helpful.

MTROUT



None.

Nov 18 2007, 5:28 pm Esponeo Post #2



Or you could use death counters.



None.

Nov 18 2007, 7:41 pm Oyen Post #3



Ya, find a tutorial on death counters. Those can be used for your needs.



None.

Nov 19 2007, 5:40 am Vrael Post #4



Just an example for a cooldown:

Conditions:
Current Player has suffered 0 Deaths of Independant Command Center (or otherwise unused unit).
Actions:
Spell Actions
Add 15 Deaths of Independant Command Center for Current Player
Preserve Trigger

Conditions:
Current Player has suffered at least 1 Deaths of Independant Command Center
Actions:
Subtract 1 Death of Independant Command Center
Preserve Trigger

And naturally, without the use of hyper triggers, 1 death count = 1 second, and with hyper triggers 12 deaths = 1 second.
This cooldown method allows for many many different systems with independant cooldowns since there are so many different units in starcraft.
Also, if you use physical units (i.e. Create 1 Spider mine @ location) you run into the possibility of CCMU, or Cannot Create More Units, and starcraft's limit is only 1650 units. If you use the right death counters, you don't need to create any units or leave a space on the map for them, or waste a location, since the death counters are internal in the starcraft memory and not on the map.



None.

Nov 20 2007, 9:00 pm MTROUT Post #5



Thanks for the info, I really was not aware of the death counter triggers. I can absolutely see the usefulness

MTROUT



None.

Nov 23 2007, 12:03 am ZugZugZealot Post #6



There's also resource counters and kill counters.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
[2024-5-04. : 1:05 am]
Vrael -- I won't stand for people going around saying things like im not a total madman
[2024-5-04. : 1:05 am]
Vrael -- that's better
[2024-5-04. : 12:39 am]
NudeRaider -- can confirm, Vrael is a total madman
[2024-5-03. : 10:18 pm]
Vrael -- who says I'm not a total madman?
[2024-5-03. : 2:26 pm]
UndeadStar -- Vrael, since the ad messages get removed, you look like a total madman for someone that come late
[2024-5-02. : 1:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[2024-5-02. : 1:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
Please log in to shout.


Members Online: jun3hong, Roy