• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Limited reincarnation

Status
Not open for further replies.
Level 2
Joined
Jun 10, 2011
Messages
20
Need some help do make a limited reincarntion.

Was thinking of doing a reincarnation spell with a limit of reincarnation's per x time...like leoric's reincarnate in -wtf mode (has a limit of deaths).


Can any1 give me a hint or help me? :)
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
try http://www.hiveworkshop.com/forums/jass-functions-413/extension-unit-event-172365/

It can capture begin reincarnation and reincarnated events

For it you will need
http://www.hiveworkshop.com/forums/...ing-up-newgen-we-intro-trigger-editor-188349/
http://www.hiveworkshop.com/forums/...art-guide-installing-lua-scripts-easy-195612/

When the unit begins reincarnating, start a timer for x time. Every time the unit reincarnates, increase the counter. If the counter reaches its limit, disable reincarnation ability =P.

What you can also do is start a timer for each time the reincarnation ability fires that way you can lower the counter whenever one of the timers expires (more realistic). If the count is maxed and a timer expires, enable the reincarnation ability.

There are more efficient ways to do this than masses of timers, but that is the easiest way.
 
Status
Not open for further replies.
Top