After a bit of tinkering, I figured out how to fire bullets that continue beyond the target point and fire in a spread. You just have an ability (I'm using a target point ability) create a persistent with a periodic effect of firing the missile. The periodic offsets become the new target point(s). You make a missile travel past those points with the launch missile's Target: Impact Offset field.
That's the solution I found, anyways. However, now I have a new problem. When firing multiple projectiles at angles from each other, the bullets behave normally when fired at a cardinal direction, but clump together increasingly as you approach NE, NW, SE, or SW, until they finally overlap perfectly.
Why is this happening and what can I do to fix it?
I'm not entirely understanding your problem. The bullets fire normally in a spread when you shoot them N, E, S or W but clump if shot using NE, NW, SE or SW as a base angle?
Yup, that's exactly it. I'm using a ballistic driver with ignore terrain enabled and Clearance Ignores Target Proximity disabled, if that makes a difference (I've tried using the other drivers, so I don't think it does). The bullets are also being fired from a single persistent, with different periodic offsets, a single periodic effect (launch missile), and a period duration of 0.
My goal is to get the missiles to fire with the same offsets from each other (7.5 degrees) no matter which direction I aim.
If you don't have a general solution in mind or a convenient tutorial to link, I can go into more detail as to exactly what I did.
I still have not found a solution for this issue. I've seen lots of units firing 'spread' shots like this before, so I know that it's completely doable. Please help me out, here. =3
No, I'm really glad you're helping me out. I didn't mean to sound angry. As long as we figure out how to do it before the summer ends (my personal deadline for the game I'm making), I'll be fine. (=
No, I'm really glad you're helping me out. I didn't mean to sound angry. As long as we figure out how to do it before the summer ends (my personal deadline for the game I'm making), I'll be fine. (=
Unfortunately, I have to eat my words. Turns out I need to finish at least the beta in two days' time (not including today, which is practically over anyways). =\
Unfortunately, in that case, I cannot help you. I'm going away for 2 weeks and will not be able to access the editor for that time. I hope you can resolve your problem.
I think I might know the issue if its the one im thinking about but it hard to know without more info or pics; is it purely a visual thing? Are you using a throw or guidance mover? Make sure you have an action actor for each launch effect if you have multiple.
The attack is essentially just a copy-pasted Yamato Cannon, as per the Diablo Fireball tutorial. I have an Effect - Target ability with 5 effects: launch missile and create persistent 1-4. The launch missile effect has:
Impact Effect: Dummy Effect
Impact Location + : (None): Target Point
Impact Offset: (0,-250,0)
The missile itself has two behaviors: Find Target and Check No Pathing. The former applies a search area effect which checks for allied units and applies a maximum of one effect to them The effect is a set which resurrects the hit unit and destroys the missile. The latter behavior applies a periodic effect that destroys the missile if the cliff level changes, or the ground below the missile is unpathable (using a Location Pathable validator with Types+: Ground and Building, and Find disabled).
The missile's mover is one of the two most probably issues. It's a ballistic mover with only one motion phase, -1 acceleration, an adaptive arrival test type, no blend type, 6 maximum and minimum speed, ignore terrain enabled, clearance ignore target proximity disabled no hook, default turn type, orientation at 720, and no overlays. All other values are at 0 or -1.
The other issue that I think likely is how I managed the ability's 5 effects. I'm working under the assumption that adding multiple effects adds multiple levels to the ability, so only one effect will fire at any given ability level. The first effect, launch missile, I've already mentioned. The other four effects, the create persistents, have:
Location Offset - End: (None): Target Point
Location Offset - Start: (None): Source Unit
Location: (None): Target Point
Period Count: 2-5 (incrementing by one with each level)
Period Effects +: Launch Missile
Periodic Offsets +: (for the level 5 persistent) (0,-2,0)(.5,-3.464,0)(-.5,-3.464,0)(1,-3.464,0)(-1,-3.464,0)
Finally, the Action actor is created at the caster when the Launch Missile effect starts, and is copied from the Yamato actor. (Meaning that it has Launch Force Site checked, whatever that means. =3)
And here are a few pics to give you an idea of what is happening. Note that the bullets SHOULD be evenly spaced. Also note the discrepancy between the facing of the character and the direction of the bullets.
I guess it's possible that the Impact Offset could be the problem as well, but I'm reluctant to change that because I want the ability to have about 150-200 range (even though the casting range is 2 at max level, which is why I need the missiles to spread and target perfectly). Should I try creating a separate launch effect and action for each missile? That seems innefficient, but then again, I can think of a lot of things in the Editor that are. =p
Links, in order:
A single bullet firing.
Five bullets firing at a near-perfect 0 degree facing.
Any idea as to how I could get redirect missile to work in my case? I'm not sure that simply adding a periodic create persistent with effect launch missile will work this time, since there is no unit launching the missile. Is there a certain setting that allows you to do that, or another way to redirect the missile's target to (target/current point + -15 y offset)?
Brilliant! Never even occurred to me to solve for the coordinates of the edge of the map in the given direction. If you paired this with an empty ability targeting the ground that made the unit face in the appropriate direction, and then used the resulting facing in your trigger, you'd have a working system!
Of course, it's still not very efficient. I think I'll play around with No Target missiles a bit. Even if I can't get it to fire using exclusively the data editor, I wonder if you could simply spawn a No Target missile with the appropriate facing using the trigger editor?
Setting the missile's mover to 'No Target' didn't work, but having a behavior in the missile that periodically created an empty effect using a persistent and redirected the missile to that works great! And, since the effect set that I used to do that only needs to trigger every couple seconds, I imagine that the lag isn't too bad.
Of course, since there's no way to check how long it takes something made through the data editor to run, I can't be sure that it's actually any faster than using that incredibly nifty trigger of yours. =3 Speaking of which, mind if I hold onto that trigger? I can think of quite a few really good uses for it.
Thank you SO MUCH for taking the time to help me out! There's no way that I would have found a solution without you! I owe you one! (=
When I said "No Target", I was actually referring to two things: setting the missile Mover's Arrival Test Type to Never and setting the Launch Missile Effect's Impact Location to (never). Unfortunately, neither of those things worked. Seems that you can't get around the fundamental requirement of giving your missile a target. =\
What I did instead is actually shockingly simple: I added a behavior to my Missile unit (changing nothing else; my Launch Missile Effect's Impact Location was still set to Target Point) that applied a periodic Set effect. The FIRST effect in the set was the persistent I mentioned. It had a single entry in Periodic Effects +: Attack Dummy Search (it's a stock effect from the Swarm.SC2Campaign mod), which in turn triggered Attack Dummy Impact (which is already set on the stock effect). I gave that same Create Persistent effect a Periodic Offsets+ entry of (0,-15,0), but you could make that value larger if you wanted to lower the period of your behavior's periodic effect or increase the speed of your missile. The SECOND effect in the set was a Redirect Missile Effect, which simply had an Impact Location+ of Target Point, with the Attack Dummy Search effect chosen (Yeah, adding effects to use as targets is an option when you double click that field. Can't believe I didn't notice sooner.). Voila! eternal forward-moving missile!
sorry for digging up a somewhat older thread, however I'm very curious about the described method of making missiles that keep going straight. I tried making what was described, however my missiles keep redirecting themselves to the lower left corner of them map, regardless of where my missile is being launched from it's persistant in the map.
Does anyone have a possible answer? I would very much like to know how to make this work.
It's been a while since I made this ability, and I've forgotten a lot of what I did since then, but I still have the original copy and can brush back up on missile movers if necessary.
As some quick advice, make sure that your missile's Impact Offset is to something more reasonable like (0,-20,0), not (0,-250,0). If your missile is moving in exactly the same direction every time, though, that field's probably not the issue. Check your Launch Missile effect and your missile's Mover.
In general, if you have an ability that's not working, the easiest way to debug it is to look at a campaign ability similar to what you want to do and see how that ability works. I'd also highly recommend that you check out the Diablo Fireball Spell Tutorial that I mentioned earlier. (;
If you just can't figure it out on your own, you can post a map of your nonfunctional missile and ask for general help, but I myself probably won't be able to devote the time to finding your particular error for another 9 days or so, when I'll finally get some free time to pursue my own interests. (like this Map Editor!)
For now I'm going to use the trigger, also provided in this thread, to make my missiles go in a straight line untill they reach the map edge. It suits my needs perfectly aswell, I was just very curious about the way you did it.
I couldnt help the fact that the missiles kept being directed to the same mapcorner every time. I even put a create-unit to the persistant, which spawned a unit in front of the missile flawlessly every period of my behavior, which leads me to believe somewhere I made a mistake in my redirection-effect.
I wouldve liked to know wether I couldve done with the data editor that which now I'm doing with the aforementioned trigger, but I can't figure out my flaw.
You're very welcome! And I'm glad that you're able to wait on this. I'll help you out in 8 days. Feel free to post your map in the mean time, and I'll look through it to find the error. Otherwise, I'll post an empty map with the finished ability for ya. (;
EDIT: 8 days later, and I think I'm stupid this morning, based on how much trouble I had. =3
You were probably having difficulties because you weren't using a ballistic mover, which was an easy change for me to make.
Unfortunately, there's some problem with either the Launch Missile ability or (more likely) the corresponding Action actor, "Fireball Attack", that I encountered because I had lazily copy-pasted the example map from the Diablo Fireball Spell Tutorial. For whatever reason, the missile actor isn't using the correct mover right off the bat, but the missile unit is, which is causing a desync between the two. Since I couldn't isolate the problem, the workaround here is the next best thing I managed. If you go to the "Fireball Redirect Behavior" on the first map that I posted and increase the Period value, you'll see what the problem is. (The Effect - Initial field doesn't actually do anything, since the behavior doesn't count as being applied when the unit starts with it)
The problem emerged when I increased the Launch Missile effect's Impact Offset, so I'm also attaching a 'marginally better' version that doesn't use an Impact Offset. (but this means that the missile won't move forever if you target a point on the ground so close that the "Fireball Redirect Behavior" behavior doesn't have time to take effect (i.e., right on top of the unit. That's a pretty small distance.))
This is kind of absolute bare-minimum knowledge for working with missiles and actors in general. I am ashamed to have not read this ages ago. =3 Better late than never, I suppose.
After a bit of tinkering, I figured out how to fire bullets that continue beyond the target point and fire in a spread. You just have an ability (I'm using a target point ability) create a persistent with a periodic effect of firing the missile. The periodic offsets become the new target point(s). You make a missile travel past those points with the launch missile's Target: Impact Offset field.
That's the solution I found, anyways. However, now I have a new problem. When firing multiple projectiles at angles from each other, the bullets behave normally when fired at a cardinal direction, but clump together increasingly as you approach NE, NW, SE, or SW, until they finally overlap perfectly.
Why is this happening and what can I do to fix it?
Any help is appreciated!
I'm not entirely understanding your problem. The bullets fire normally in a spread when you shoot them N, E, S or W but clump if shot using NE, NW, SE or SW as a base angle?
@Spoolofwhool: Go
Yup, that's exactly it. I'm using a ballistic driver with ignore terrain enabled and Clearance Ignores Target Proximity disabled, if that makes a difference (I've tried using the other drivers, so I don't think it does). The bullets are also being fired from a single persistent, with different periodic offsets, a single periodic effect (launch missile), and a period duration of 0.
My goal is to get the missiles to fire with the same offsets from each other (7.5 degrees) no matter which direction I aim.
If you don't have a general solution in mind or a convenient tutorial to link, I can go into more detail as to exactly what I did.
I still have not found a solution for this issue. I've seen lots of units firing 'spread' shots like this before, so I know that it's completely doable. Please help me out, here. =3
Sorry. I've been busy helping other people. I should hopefully have a response in 24 hours.
@Spoolofwhool: Go
No, I'm really glad you're helping me out. I didn't mean to sound angry. As long as we figure out how to do it before the summer ends (my personal deadline for the game I'm making), I'll be fine. (=
Unfortunately, I have to eat my words. Turns out I need to finish at least the beta in two days' time (not including today, which is practically over anyways). =\
@Someguy3141: Go
Unfortunately, in that case, I cannot help you. I'm going away for 2 weeks and will not be able to access the editor for that time. I hope you can resolve your problem.
I think I might know the issue if its the one im thinking about but it hard to know without more info or pics; is it purely a visual thing? Are you using a throw or guidance mover? Make sure you have an action actor for each launch effect if you have multiple.
@hobbidude: Go
It's not just a graphical glitch.
The attack is essentially just a copy-pasted Yamato Cannon, as per the Diablo Fireball tutorial. I have an Effect - Target ability with 5 effects: launch missile and create persistent 1-4. The launch missile effect has:
Impact Effect: Dummy Effect
Impact Location + : (None): Target Point
Impact Offset: (0,-250,0)
The missile itself has two behaviors: Find Target and Check No Pathing. The former applies a search area effect which checks for allied units and applies a maximum of one effect to them The effect is a set which resurrects the hit unit and destroys the missile. The latter behavior applies a periodic effect that destroys the missile if the cliff level changes, or the ground below the missile is unpathable (using a Location Pathable validator with Types+: Ground and Building, and Find disabled).
The missile's mover is one of the two most probably issues. It's a ballistic mover with only one motion phase, -1 acceleration, an adaptive arrival test type, no blend type, 6 maximum and minimum speed, ignore terrain enabled, clearance ignore target proximity disabled no hook, default turn type, orientation at 720, and no overlays. All other values are at 0 or -1.
The other issue that I think likely is how I managed the ability's 5 effects. I'm working under the assumption that adding multiple effects adds multiple levels to the ability, so only one effect will fire at any given ability level. The first effect, launch missile, I've already mentioned. The other four effects, the create persistents, have:
Location Offset - End: (None): Target Point
Location Offset - Start: (None): Source Unit
Location: (None): Target Point
Period Count: 2-5 (incrementing by one with each level)
Period Effects +: Launch Missile
Periodic Offsets +: (for the level 5 persistent) (0,-2,0)(.5,-3.464,0)(-.5,-3.464,0)(1,-3.464,0)(-1,-3.464,0)
Finally, the Action actor is created at the caster when the Launch Missile effect starts, and is copied from the Yamato actor. (Meaning that it has Launch Force Site checked, whatever that means. =3)
And here are a few pics to give you an idea of what is happening. Note that the bullets SHOULD be evenly spaced. Also note the discrepancy between the facing of the character and the direction of the bullets.
I guess it's possible that the Impact Offset could be the problem as well, but I'm reluctant to change that because I want the ability to have about 150-200 range (even though the casting range is 2 at max level, which is why I need the missiles to spread and target perfectly). Should I try creating a separate launch effect and action for each missile? That seems innefficient, but then again, I can think of a lot of things in the Editor that are. =p
Links, in order:
A single bullet firing.
Five bullets firing at a near-perfect 0 degree facing.
Five bullets firing near 45 degrees.
@QuantumMenace: Go
THANK YOU!!!
Any idea as to how I could get redirect missile to work in my case? I'm not sure that simply adding a periodic create persistent with effect launch missile will work this time, since there is no unit launching the missile. Is there a certain setting that allows you to do that, or another way to redirect the missile's target to (target/current point + -15 y offset)?
@QuantumMenace: Go
Brilliant! Never even occurred to me to solve for the coordinates of the edge of the map in the given direction. If you paired this with an empty ability targeting the ground that made the unit face in the appropriate direction, and then used the resulting facing in your trigger, you'd have a working system!
Of course, it's still not very efficient. I think I'll play around with No Target missiles a bit. Even if I can't get it to fire using exclusively the data editor, I wonder if you could simply spawn a No Target missile with the appropriate facing using the trigger editor?
@QuantumMenace: Go
GOT IT!!!
Setting the missile's mover to 'No Target' didn't work, but having a behavior in the missile that periodically created an empty effect using a persistent and redirected the missile to that works great! And, since the effect set that I used to do that only needs to trigger every couple seconds, I imagine that the lag isn't too bad.
Of course, since there's no way to check how long it takes something made through the data editor to run, I can't be sure that it's actually any faster than using that incredibly nifty trigger of yours. =3 Speaking of which, mind if I hold onto that trigger? I can think of quite a few really good uses for it.
Thank you SO MUCH for taking the time to help me out! There's no way that I would have found a solution without you! I owe you one! (=
@QuantumMenace: Go
Sure! Sorry for being so vague. =3
When I said "No Target", I was actually referring to two things: setting the missile Mover's Arrival Test Type to Never and setting the Launch Missile Effect's Impact Location to (never). Unfortunately, neither of those things worked. Seems that you can't get around the fundamental requirement of giving your missile a target. =\
What I did instead is actually shockingly simple: I added a behavior to my Missile unit (changing nothing else; my Launch Missile Effect's Impact Location was still set to Target Point) that applied a periodic Set effect. The FIRST effect in the set was the persistent I mentioned. It had a single entry in Periodic Effects +: Attack Dummy Search (it's a stock effect from the Swarm.SC2Campaign mod), which in turn triggered Attack Dummy Impact (which is already set on the stock effect). I gave that same Create Persistent effect a Periodic Offsets+ entry of (0,-15,0), but you could make that value larger if you wanted to lower the period of your behavior's periodic effect or increase the speed of your missile. The SECOND effect in the set was a Redirect Missile Effect, which simply had an Impact Location+ of Target Point, with the Attack Dummy Search effect chosen (Yeah, adding effects to use as targets is an option when you double click that field. Can't believe I didn't notice sooner.). Voila! eternal forward-moving missile!
Thanks for posting all this information as you've figured it out Someguy.
I often go searching through various threads trying to learn things, even if I have no immediate need to put them into use.
Great work documenting it all :)
Hey,
sorry for digging up a somewhat older thread, however I'm very curious about the described method of making missiles that keep going straight. I tried making what was described, however my missiles keep redirecting themselves to the lower left corner of them map, regardless of where my missile is being launched from it's persistant in the map.
Does anyone have a possible answer? I would very much like to know how to make this work.
Many thanks in advance.
@Pecula: Go
Hey, Pecula!
It's been a while since I made this ability, and I've forgotten a lot of what I did since then, but I still have the original copy and can brush back up on missile movers if necessary.
As some quick advice, make sure that your missile's Impact Offset is to something more reasonable like (0,-20,0), not (0,-250,0). If your missile is moving in exactly the same direction every time, though, that field's probably not the issue. Check your Launch Missile effect and your missile's Mover.
In general, if you have an ability that's not working, the easiest way to debug it is to look at a campaign ability similar to what you want to do and see how that ability works. I'd also highly recommend that you check out the Diablo Fireball Spell Tutorial that I mentioned earlier. (;
If you just can't figure it out on your own, you can post a map of your nonfunctional missile and ask for general help, but I myself probably won't be able to devote the time to finding your particular error for another 9 days or so, when I'll finally get some free time to pursue my own interests. (like this Map Editor!)
Hey,
For now I'm going to use the trigger, also provided in this thread, to make my missiles go in a straight line untill they reach the map edge. It suits my needs perfectly aswell, I was just very curious about the way you did it. I couldnt help the fact that the missiles kept being directed to the same mapcorner every time. I even put a create-unit to the persistant, which spawned a unit in front of the missile flawlessly every period of my behavior, which leads me to believe somewhere I made a mistake in my redirection-effect. I wouldve liked to know wether I couldve done with the data editor that which now I'm doing with the aforementioned trigger, but I can't figure out my flaw.
Thanks alot for the reply
@Pecula: Go
You're very welcome! And I'm glad that you're able to wait on this. I'll help you out in 8 days. Feel free to post your map in the mean time, and I'll look through it to find the error. Otherwise, I'll post an empty map with the finished ability for ya. (;
EDIT: 8 days later, and I think I'm stupid this morning, based on how much trouble I had. =3 You were probably having difficulties because you weren't using a ballistic mover, which was an easy change for me to make.
Unfortunately, there's some problem with either the Launch Missile ability or (more likely) the corresponding Action actor, "Fireball Attack", that I encountered because I had lazily copy-pasted the example map from the Diablo Fireball Spell Tutorial. For whatever reason, the missile actor isn't using the correct mover right off the bat, but the missile unit is, which is causing a desync between the two. Since I couldn't isolate the problem, the workaround here is the next best thing I managed. If you go to the "Fireball Redirect Behavior" on the first map that I posted and increase the Period value, you'll see what the problem is. (The Effect - Initial field doesn't actually do anything, since the behavior doesn't count as being applied when the unit starts with it)
The problem emerged when I increased the Launch Missile effect's Impact Offset, so I'm also attaching a 'marginally better' version that doesn't use an Impact Offset. (but this means that the missile won't move forever if you target a point on the ground so close that the "Fireball Redirect Behavior" behavior doesn't have time to take effect (i.e., right on top of the unit. That's a pretty small distance.))
By the way, is anyone else more knowledgeable about Actors than me familiar with this problem?
EDIT: Allow me to direct your attention to this most excellent tutorial, which should empower you to pinpoint the problem for yourself: http://www.sc2mapster.com/forums/resources/tutorials/4656-data-working-with-actors-beginner-difficulty/
This is kind of absolute bare-minimum knowledge for working with missiles and actors in general. I am ashamed to have not read this ages ago. =3 Better late than never, I suppose.