• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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? :)
 
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