HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Instead of repeated timer triggers

05-20-2004, 02:48 PM#1
ThyFlame
If set up properly, this should save you from having a large amount of timers. Just be sure the buff lasts the amount of time you want and that each buff you're using is different.


Okay I got a little bored and did this psuedo-code. It actually isnt that much extra work and is an avoidance of local variables and multiple triggers on the same thing.


Just an interesting idea to me.

------

Timers instead of Buff
12 Units off the screen one for each player.
Dummy Buff lasts however many sections you want to avoid. These units are off the playable screen, owned by neutral passive, and each 1 of the 12 is assigned a place in the buffRecievers unit array to represent a player.

Unit dies

Unit == hero

create dummy caster for neutral hostile
order last created unit to cast [spell w/ dummy buff] on buffRecievers[Number of Owner of hero]
set boolean isDead[Number of Owner of hero] = true

Every 1 second

For each integer A (1 to 12)
IF
buffReceivers[Integer A] has [dummy buff] = false AND isDead[Integer A] = true
THEN
set isDead[Integer A] = false
[Actions -- In this case reviving]
Revive heroArray[Integer A] at (wherever).
05-22-2004, 07:14 PM#2
johnfn
I think I'll bring this back since its a reasonably good idea. I think that there are a few things that could go wrong (the unit with the buff is killed, for ex) and creating all those buffs might take awhile. However, you never know if someone will find this useful.