I am having troubles making a trigger that makes a unit die once it casts a specific spell.
Currently I have it like this.
events-any unit casts psi storm
variables-
conditions-
actions-kill triggering unit
The problem with this is that it instantly kills the unit, so it never creates the psi storm. Is there a way to put a slight delay between the event and the action?
Also, is there a good tutorial on making a shop where people can buy units that instantly appear?
Don't use a trigger, have the effect of the psi-storm storm set to "kill unit" under the damage effect in the data editor. Make sure that there is a set of damage effects; one for the caster, and one for the target. That should do the trick.
Oh and for the shop I would just search around the forums; I don't have any in mind.
I used a wait action in the trigger, but if the unit casts the spell outside of its range, it would still die without casting psi storm. I have been looking under the psi storm effects, but I haven't found how to make it kill the caster. Can you explain in further detail how to do this?
Normally the psi-storm has 2 jobs. 1 is to create the actor, and another is to do the damage. Don't worry about the actor effect. Go to the effects tab, and create a new effect. This effect will have type "damage". Make sure that the target is set to caster, and that the flag "kill" is set to true. Then create another effect. This effect will have type "set". Have this set effect set to 2 effects. The first is the standard psi-storm effect, which is I believe a periodic effect. The second will be the damage effect you just made.
Now go into the abilities tab and find the psi-storm ability, and find where the periodic effect is linked to the ability. Then change that with the set effect you just made, and you should be good to go. The high templar (or whatever unit is using psi-storm) will cast the ability and then immediately kill itself.
Some things to note are that the high templar will likely not finish its animation, which is okay. Adding a timer could lead to some undesirable effects, so I would advise not doing so. Also, if you are recording kills for each player, this might mess up the scoring, although I am not sure.
If you have any more questions, I would recommend looking through the tutorials, because going into any more depth would be almost like a tutorial anyways lol.
Rollback Post to RevisionRollBack
Great to be back and part of the community again!
To post a comment, please login or register a new account.
I am having troubles making a trigger that makes a unit die once it casts a specific spell. Currently I have it like this. events-any unit casts psi storm variables- conditions- actions-kill triggering unit
The problem with this is that it instantly kills the unit, so it never creates the psi storm. Is there a way to put a slight delay between the event and the action?
Also, is there a good tutorial on making a shop where people can buy units that instantly appear?
Thanks a bunch!!
@MrZentors: Go
Welcome to sc2mapster. :D
Well I recommend using a damage effect in the spell the kill the caster, but you could just put a wait in your trigger.
About the shop, The best way to do it is just have a dummy shop, and whenever someone selects it you make them select an invisible shop that they own.
@MrZentors:
Don't use a trigger, have the effect of the psi-storm storm set to "kill unit" under the damage effect in the data editor. Make sure that there is a set of damage effects; one for the caster, and one for the target. That should do the trick.
Oh and for the shop I would just search around the forums; I don't have any in mind.
Great to be back and part of the community again!
@TacoManStan: Go
I thought asked you to confirm posting If somebody had posted before you.....
Nothing wrong with a trigger, though. You can just add a Wait action, before killing the unit.
@grenegg:
I thought that your post was unclear, so I posted mine also.
Great to be back and part of the community again!
I used a wait action in the trigger, but if the unit casts the spell outside of its range, it would still die without casting psi storm. I have been looking under the psi storm effects, but I haven't found how to make it kill the caster. Can you explain in further detail how to do this?
Thanks for your help!
@MrZentors:
Normally the psi-storm has 2 jobs. 1 is to create the actor, and another is to do the damage. Don't worry about the actor effect. Go to the effects tab, and create a new effect. This effect will have type "damage". Make sure that the target is set to caster, and that the flag "kill" is set to true. Then create another effect. This effect will have type "set". Have this set effect set to 2 effects. The first is the standard psi-storm effect, which is I believe a periodic effect. The second will be the damage effect you just made.
Now go into the abilities tab and find the psi-storm ability, and find where the periodic effect is linked to the ability. Then change that with the set effect you just made, and you should be good to go. The high templar (or whatever unit is using psi-storm) will cast the ability and then immediately kill itself.
Some things to note are that the high templar will likely not finish its animation, which is okay. Adding a timer could lead to some undesirable effects, so I would advise not doing so. Also, if you are recording kills for each player, this might mess up the scoring, although I am not sure.
If you have any more questions, I would recommend looking through the tutorials, because going into any more depth would be almost like a tutorial anyways lol.
Great to be back and part of the community again!