Here's what I'm trying to do. I have a hellion which I control with WASD movement. Mouse cursor is disabled.
What I want to do, is that when I press the spacebar, the hellion uses his weapon (so the flamethrower), shoots in front of him...and if there's anything there it takes damage.
How would I go about doing this? I've search all over and can't seem to find anything that would give me ideas on how to do this.
I would use an effect of type "Create Persistent" and set the x value of the periodic offset to 0, the y value to a negative value to create it in front of your unit. Then set the periodic duration to 0 and the periodic count to 1. Know you have a point in front of your unit and I´m pretty sure you can use the attack of the normal hellion for the rest.
I´m still a beginner in the ScII editor, so I don´t know if there is a better way to solve this, but I would do it this way.
@D1000: I know this is a bump, but I'm trying to do the same thing with raynor and didn't quite understand your directions. Could you or someone else clarify?
I ran into this same problem a while back. The solution that I used was that I made an ability that targeted a point and had that ability create the effects of the hellions cannon. Then in my triggers I had the Hellion use the ability directly in front of it.
I don't remember the exact syntax of the issue order action but when you handle your keydown event for attacking do something like this:
Order [Hellion] to ([Hellion Attack] targeting [PointWithPolarOffset(Position of ([Hellion]) offset by [1.0] with an angle of (Facing angle of [Hellion])])
Cool, thanks to both of you. This should help, though I was hoping there'd be an easier way because I see all these FPS and TPS engines popping up. Ah well.
I have Hellion weapon for my marauder (with 0 stats period so its like a constant flame while its active).
And I pretty much have same code as what KineMorto wrote, on Spacebar (down).
I must be missing something obvious because When the player unit walks up to an enemy and i press spacebar it fires, but it wont fire if theres no enemy in front of the unit. it makes it very klunky with a bunch of zerglings because they attack from all angles.
How do you make the attack occur regardless of whether a target exists?
Hi guys,
Here's what I'm trying to do. I have a hellion which I control with WASD movement. Mouse cursor is disabled.
What I want to do, is that when I press the spacebar, the hellion uses his weapon (so the flamethrower), shoots in front of him...and if there's anything there it takes damage.
How would I go about doing this? I've search all over and can't seem to find anything that would give me ideas on how to do this.
Thanks in advance!
I would use an effect of type "Create Persistent" and set the x value of the periodic offset to 0, the y value to a negative value to create it in front of your unit. Then set the periodic duration to 0 and the periodic count to 1. Know you have a point in front of your unit and I´m pretty sure you can use the attack of the normal hellion for the rest.
I´m still a beginner in the ScII editor, so I don´t know if there is a better way to solve this, but I would do it this way.
@D1000: I know this is a bump, but I'm trying to do the same thing with raynor and didn't quite understand your directions. Could you or someone else clarify?
Look at this tutorial here
http://rileystarcraft.blogspot.com/2010/05/tutorial-how-to-create-shockwave.html
It does what you are looking for, just ignore the part about stunning. Also, you will have to make the actors on your own.
I ran into this same problem a while back. The solution that I used was that I made an ability that targeted a point and had that ability create the effects of the hellions cannon. Then in my triggers I had the Hellion use the ability directly in front of it.
I don't remember the exact syntax of the issue order action but when you handle your keydown event for attacking do something like this:
Order [Hellion] to ([Hellion Attack] targeting [PointWithPolarOffset(Position of ([Hellion]) offset by [1.0] with an angle of (Facing angle of [Hellion])])
Cool, thanks to both of you. This should help, though I was hoping there'd be an easier way because I see all these FPS and TPS engines popping up. Ah well.
Hmm.
I have Hellion weapon for my marauder (with 0 stats period so its like a constant flame while its active). And I pretty much have same code as what KineMorto wrote, on Spacebar (down).
I must be missing something obvious because When the player unit walks up to an enemy and i press spacebar it fires, but it wont fire if theres no enemy in front of the unit. it makes it very klunky with a bunch of zerglings because they attack from all angles.
How do you make the attack occur regardless of whether a target exists?