• 🏆 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!

How to make limit for infernal ulti?

Status
Not open for further replies.
Level 12
Joined
Mar 24, 2011
Messages
1,082
When a player starts the effect of the infernal ability, try checking if the player already has a unit of type infernal, and if so, kill that unit.
Not MUI.

Give it an expiration timer which is equal to the cooldown of the spell ?
Would work only if you are not messing up with cooldowns.

Otherwise, you will have to record each caster and its spawn... no wait, you'll have to trigger the spell yourself.

Regards
-Ned
 
Level 9
Joined
Apr 23, 2011
Messages
527
Give it an expiration timer which is equal to the cooldown of the spell ?
Would work only if you are not messing up with cooldowns.

That wouldn't work in the context of the ability either, as the infernal would die (and would not be replaced) before the unit casts a new infernal.

For it to be MUI, it would be better to record the caster and if it has spawned an infernal, yes.
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
Use this event:
  • Unit - A unit Spawns a summoned unit
When a unit summons an infernal, store the infernal for that unit (unit indexer or hashtable).
If the unit summons an infernal again, kill the previously summoned infernal, if it exists.


In case the infernal can be summoned from an item (Infernal Stone) as well, you might have to do a bit more to make sure this item is not affected as well.
 
Status
Not open for further replies.
Top