I was thinking about the best way to create a missile, which flies straight forward and collides with the first enemy it hits; basically for very simple spells a la diablo 2 sorceress fireball.
Since the launch missile effect seems not to support dynamic projectile collision but only collisions with the predefined target, I thought about using a workaround, like using a ballistic missile with no check for the target point (that way we have a straight forward missile which will never hit anything - range can be limited with the max life time) and adding a behavior with a periodic search effect to the missile unit, which kills the missile and applies damage in case an enemy was found.
I did not try it out yet, because I wanted to ask, if there is an actual method to do this I am not aware of, or if someone has a better aproach for this. I have definitely seen some maps utilizing similar spells, but most of them were trigger-based and the projectiles were units, which were given move orders via trigger. I wanted to create this spell in the data editor, if possible.
Your method is what most people use. Additionally, Blizzard already has an example of this - they used it for their Lost Viking game! (search for SS_ type effects and such)
€ lost vikings... usually I look such things up in similar spells, but I did not think of lost vikings ;) *facepalm*
€ now I am stuck with the actors for this. How to attach the missile to, for example, the weapon of the caster? Usual missile-attack actors do not seem to work properly; I also tried to attach the actor of the missile unit directly.
If you are using the method of making a normal launch missile effect, just giving the missile a periodic searcher behavior, as far as I know the actors should work the same is usual. Did you make sure that everything is hooked up properly, with the impact effect being the damage dealt upon collision?
Perhaps you could be a bit more specific. When you say they do not seem to work properly, do you mean the missiles just don't show up? Or that they don't visibly die?
If you are using the method of making a normal launch missile effect, just giving the missile a periodic searcher behavior, as far as I know the actors should work the same is usual. Did you make sure that everything is hooked up properly, with the impact effect being the damage dealt upon collision?
Perhaps you could be a bit more specific. When you say they do not seem to work properly, do you mean the missiles just don't show up? Or that they don't visibly die?
Yeah, i just mentioned it in case I had to use the actors in a different way, which I was not aware of.
So basically for a usual, missile-based attack, you want a projectile unit with an actor; nothing specific to set here. Assuming the effects all work as they should, you now have a missile, which travels on the ground from unit center to impact point.
Now for the attach to weapon part, you need another actor (usually actor type action, based on generic attack or generic attack base or sth, does not really matter).
For this you need to set the Art - missile to the actor of the projectile unit and set the actor events to create when the launch effect starts and to send an impact message when the damage starts. Then you can set the launch attachment query to weapon and everything works fine for a usual missile attack.
Everything correct so far? Did I miss something?
I did just the same and the missile still travels on the ground from center to center. The actor is being created, however, and the impact works aswell; I used launch and impact sounds to verify this.
€ Correction: I do Not her an impact sound, launch sound works fine, though.
So my explanation was probably you cannot use the same actor here, because manually interfering in a missiles path cannot be handled with this actor (obviously this explanation is wrong, I must have missed something)
Attach as in firing from the weapon's mount point instead of from the center? Action actors is how I've been doing it,
Yep, thats exactly what I use.
€ Okay, sometimes this editor is very frustrating. I did some further testing. I replaced the projectile with the stalker projectile and everything worked. So I assumed my mistake was somewhere in the projectile unit or the actor of it. I copied every value of the stalker's projectile (actually from what I could tell i changed basically only the model, the rest was almost identical)
And, guess what: It did not work.
So I duplicated the stalker projectile and its actor and used them. These were not almost, but absolutely identical by now. But... now it works. Blows my mind.
Hey
I was thinking about the best way to create a missile, which flies straight forward and collides with the first enemy it hits; basically for very simple spells a la diablo 2 sorceress fireball.
Since the launch missile effect seems not to support dynamic projectile collision but only collisions with the predefined target, I thought about using a workaround, like using a ballistic missile with no check for the target point (that way we have a straight forward missile which will never hit anything - range can be limited with the max life time) and adding a behavior with a periodic search effect to the missile unit, which kills the missile and applies damage in case an enemy was found.
I did not try it out yet, because I wanted to ask, if there is an actual method to do this I am not aware of, or if someone has a better aproach for this. I have definitely seen some maps utilizing similar spells, but most of them were trigger-based and the projectiles were units, which were given move orders via trigger. I wanted to create this spell in the data editor, if possible.
@Kueken531: Go
Your method is what most people use. Additionally, Blizzard already has an example of this - they used it for their Lost Viking game! (search for SS_ type effects and such)
Okay, thanks. In this case, I shall try it ;)
€ lost vikings... usually I look such things up in similar spells, but I did not think of lost vikings ;) *facepalm*
€ now I am stuck with the actors for this. How to attach the missile to, for example, the weapon of the caster? Usual missile-attack actors do not seem to work properly; I also tried to attach the actor of the missile unit directly.
If you are using the method of making a normal launch missile effect, just giving the missile a periodic searcher behavior, as far as I know the actors should work the same is usual. Did you make sure that everything is hooked up properly, with the impact effect being the damage dealt upon collision?
Perhaps you could be a bit more specific. When you say they do not seem to work properly, do you mean the missiles just don't show up? Or that they don't visibly die?
@Kueken531: Go
Attach as in firing from the weapon's mount point instead of from the center? Action actors is how I've been doing it,
Yeah, i just mentioned it in case I had to use the actors in a different way, which I was not aware of.
So basically for a usual, missile-based attack, you want a projectile unit with an actor; nothing specific to set here. Assuming the effects all work as they should, you now have a missile, which travels on the ground from unit center to impact point.
Now for the attach to weapon part, you need another actor (usually actor type action, based on generic attack or generic attack base or sth, does not really matter).
For this you need to set the Art - missile to the actor of the projectile unit and set the actor events to create when the launch effect starts and to send an impact message when the damage starts. Then you can set the launch attachment query to weapon and everything works fine for a usual missile attack.
Everything correct so far? Did I miss something?
I did just the same and the missile still travels on the ground from center to center. The actor is being created, however, and the impact works aswell; I used launch and impact sounds to verify this. € Correction: I do Not her an impact sound, launch sound works fine, though.
So my explanation was probably you cannot use the same actor here, because manually interfering in a missiles path cannot be handled with this actor (obviously this explanation is wrong, I must have missed something)
Yep, thats exactly what I use.
€ Okay, sometimes this editor is very frustrating. I did some further testing. I replaced the projectile with the stalker projectile and everything worked. So I assumed my mistake was somewhere in the projectile unit or the actor of it. I copied every value of the stalker's projectile (actually from what I could tell i changed basically only the model, the rest was almost identical)
And, guess what: It did not work.
So I duplicated the stalker projectile and its actor and used them. These were not almost, but absolutely identical by now. But... now it works. Blows my mind.