• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Expiration Timer for Unit

Status
Not open for further replies.
Level 10
Joined
Feb 22, 2008
Messages
619
I like to set the unit's max and starting mana to something like 60 or 100 and their mana regen to -1, then use a trigger to check if their mana is 0 and they 'expire' if it is.
I have dummy units that don't need to last more than a second expire after 0.01 or 0.1 seconds.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
I like to set the unit's max and starting mana to something like 60 or 100 and their mana regen to -1, then use a trigger to check if their mana is 0 and they 'expire' if it is.
I have dummy units that don't need to last more than a second expire after 0.01 or 0.1 seconds.

So its just however long you need to use it? x) I remeber seeing almost every system put 1.5 or 2 seconds, so I just assumed that was the ideal number to put down.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
The thing where you see people use it for is when the dummy has to stun a few units or cast a specific spell.
The dummy has definately cast the spell after 2 seconds.

However sometimes you need values up to 20 seconds.

For visually spawned units with an expiration time, DeadZero knows how to make it more obvious how much time is left (in %).
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Basically, a recap:

Visual/SFX
- Up to how long you want / seems logical for the unit to play its Animation you want.
- Let's say an Exploding Animation that takes 3.5 seconds.

Dummy Caster
- 2 seconds.
- Although most of my dummy caster (solely for casting spells) I put for 0.5 seconds, and it works.

If you want to become more efficient, use only 1 Dummy Caster for the entire spells (in the map).

You create a Dummy, and save it as a variable, and use the Dummy for all types of spell-casting.

This way, you're only using 1 Dummy for multiple spells, more efficient and less unit creation, leading to a good long-run gameplay.

But it also depend on the nature of your spells too, which can share, and which cannot share.
 
Status
Not open for further replies.
Top