- Joined
- Dec 28, 2009
- Messages
- 257
Heya folks, another question of mine
The question: What is the best way to delete(remove) spell effects or dummies created by trigger, when using some spell etc?
PS: I tend to write EVERYTHING in very long messages, even petty questions... hope its not too long to read
Some talk:
Lets say i have spell like Holy Light, but when i cast it trigger creates some hardly-visible unit (i think thats what you call a Dummy?), gives it my custom spell to increase attack speed based on Bloodlust, uses it on original target and then dissapears. + It does some special effect like "ressurection-target" on target via trigger too (i'd put this art to spell instead, but lets say i do it via trigger).
So something like:
Event - unit begins casting spell
blah blah Holy Light
Action: Create 1 albatross for (owner of casting unit) at position of (target)
Add "Bloodlust(custom) to Last created unit
order Last created unit to Orc Shammy - bloodlust original Target
Create special effect "Ressurection - target" at Target
And now i should add something like
/Wait 0,5 seconds*
/remove last created unit from game
/remove last created effect from game**
*if i removed it instantly, it might not finish casting spell (happens), and effect might not be even seen
**I might only think it but spell effect doesnt simply dissapear after it uses main animation, it stays there, invisible as rogue..
As far as i know. But afaik, this way to do it might suck. I dont like using /Wait action in such triggers, im afraid it might cause some havoc, but i have to delete those "dummies" somehow (or ill give that dummy 5 hp and HP regen -1 per second so it dies anyway?).
So again question, in spells like this, or any trigger that creates special effect or some dummy to cast another spell, what is the best way to get rid of that unit/effect? To avoid leaks, or ending up with 30dummies from using this spell? My simple one with /Wait and then /remove is fine, or id have to go for something complex?
And please, no Jass or post some Jass with instructions, im useless at that, or something simple and 99,9+% working, and not longer than 5 trigger lines
Thanks for help, hope you understood what i meant and you dont laugh at the way i do some spells, im noob!
The question: What is the best way to delete(remove) spell effects or dummies created by trigger, when using some spell etc?
PS: I tend to write EVERYTHING in very long messages, even petty questions... hope its not too long to read
Some talk:
Lets say i have spell like Holy Light, but when i cast it trigger creates some hardly-visible unit (i think thats what you call a Dummy?), gives it my custom spell to increase attack speed based on Bloodlust, uses it on original target and then dissapears. + It does some special effect like "ressurection-target" on target via trigger too (i'd put this art to spell instead, but lets say i do it via trigger).
So something like:
Event - unit begins casting spell
blah blah Holy Light
Action: Create 1 albatross for (owner of casting unit) at position of (target)
Add "Bloodlust(custom) to Last created unit
order Last created unit to Orc Shammy - bloodlust original Target
Create special effect "Ressurection - target" at Target
And now i should add something like
/Wait 0,5 seconds*
/remove last created unit from game
/remove last created effect from game**
*if i removed it instantly, it might not finish casting spell (happens), and effect might not be even seen
**I might only think it but spell effect doesnt simply dissapear after it uses main animation, it stays there, invisible as rogue..
As far as i know. But afaik, this way to do it might suck. I dont like using /Wait action in such triggers, im afraid it might cause some havoc, but i have to delete those "dummies" somehow (or ill give that dummy 5 hp and HP regen -1 per second so it dies anyway?).
So again question, in spells like this, or any trigger that creates special effect or some dummy to cast another spell, what is the best way to get rid of that unit/effect? To avoid leaks, or ending up with 30dummies from using this spell? My simple one with /Wait and then /remove is fine, or id have to go for something complex?
And please, no Jass or post some Jass with instructions, im useless at that, or something simple and 99,9+% working, and not longer than 5 trigger lines
Thanks for help, hope you understood what i meant and you dont laugh at the way i do some spells, im noob!