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

[Trigger] Auto-target spell

Status
Not open for further replies.
Level 3
Joined
Aug 25, 2012
Messages
30
Hello, i am making a spell, that will boost AS, MS and dmg (everything in %) so i based in on Cripple (using -0.20 for +20%)
I added to targets only self but i want, when i cast this spell, to auto-target the spell on me (like for example windwalk)
could anybody help me please?
 
Level 3
Joined
Aug 25, 2012
Messages
30
I have got a problem, i used trigger 'unit finishes casting of ability' to remove dummy, dummy is removed bud spell do simply nothing :(

EDIT: Fixed, i add there 'wait' ;)
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
Use the "Channel" spell as dummy skill. You can easily make it be self-cast, unit-point-cast, unit-cast, point-cast, no-target. It can even be a unit-cast with targeting image. I highly recommend Channel. It's actually batter than Berserk because it naturally has no buffs.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
You can also use Unit - Add expiration timer

Then another trigger that removes dummy units from the game on death.
Are you sure units die in natural way will cause leaks ?
I think it's a small leak, you don't have to UnitRemove it anyway (it's too small).
But if you generate units like 100 units per second, you might have problem with it, but only crazy person would design games to be like that.
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
Are you sure units die in natural way will cause leaks ?
I think it's a small leak, you don't have to UnitRemove it anyway (it's too small).
But if you generate units like 100 units per second, you might have problem with it, but only crazy person would design games to be like that.
Yep, here we go again. "do dead units leak?" part 2. I was expecting it. Shall we talk about globals, sir? :ogre_haosis:
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
by the way if you add exparation timer to the unit it will kill it and after some time(specified in gameplay constants) it will decay which will cause the unit to be removed from the game naturally so you dont even need the trigger for removing the unit
natural decay cause the same leak as simple Unit - Remove unit from game or maybe even less
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
by the way if you add exparation timer to the unit it will kill it and after some time(specified in gameplay constants) it will decay which will cause the unit to be removed from the game naturally
(I was asking this question in the other thread about "dead unit leak ?" and this question is for DSG but he did not answer me)

Well, he said that provided that the unit has a decay duration (Object Editor), when the unit dies, it will not leak because once a unit dies, it will start the decay and once the decay duration has ended, the unit is naturally removed via game engine.

What I want to know, I always taught by tutorials that by setting my dummy unit's Combat - Death Type: Can't raise , Does not decay
Meaning my dummy unit all this while, leak ?

If you have a solid evidence for this (rather than comparing your RAM speed, lol), I'd be glad to change my opinion on Combat - Death Type.
 
Status
Not open for further replies.
Top