The colliding missile is working fine. It collides with units on its way to the target, damages them, destroys the missile, and creates an impact effect. However, I want the missile to keep travelling past the target and be able to collide with units past the target too. It's more a matter of getting the mover to keep the missile moving. Right now I have the weapon firing 9 missiles at a random offset near the targeted unit's location with the Thor AA mover, which has only one motion phase. Its driver is guidance and works fine getting to the offset near the target and some shots are supposed to miss. However, when it reaches the targeted point without colliding with any unit the missile just sits there and spins erratically until a timeout behavior I put on the ammo unit kills it. While the missile is spinning enemy units can move into the missile and collide with it and take damage.
I'm thinking that I would need to add a motion phase with driver throw after the guidance phase is done that keeps it moving or change the first motion phase's driver to throw, but I have no clue as to how the throw driver works in movers. I have already tried changing the mover's driver to throw but it always fires south towards the bottom of the map, probably because I have no idea how it works.
Any help/advice/knowledge about this would be greatly appreciated!
I want the missile to be able to go PAST the unit that is being targeted for the weapon. Something like this:
One game that uses the same idea in SC2 is mission frontier. All of the non-homing weapons shoot at the target's position and travel past the target if they miss.
what i said
put an persistant effect infront of the launch effect of the weapon. this persistant effect is created with an offset to the target (max travel distance of your projectile). now change the target of your launch effect to the persistant effect and connect the persistant effect with the launch effect (set phase counter to 1 and add the launch effect to periodic effects).
now you still need a collision detector. this is basically a behaviour that periodically checks if a unit is close, if close deal dmg.
(behaviour - periodic effect - search effect - dmg)
I tried what you suggested first FunkyUserName but the missiles wouldn't launch from the unit when I set the impact location to the persistent and I decided to try something else. I changed the mover to have 2 motion phases. The first motion phase uses guidance to move the missile in the direction of the offset point (the timeout of this phase is .0625 ). The second motion phase uses throw and makes the missile continue in the direction that was set by the guidance phase. I also set the throw vector's Y property to -1 (not sure if this is important or not)
Thanks for the help FunkyUserName! :)
Edit: I just had it working and I broke it somehow :( Trying to fix...
Can't seem to fix it. Closest I got to it working was putting another phase after guidance that had no driver but the missiles had a tendency to change directions and speed
Edit #2: What's causing the missiles to explode on the point of offset has to be from the guidance motion phase. With only the throw phase the missile works fine but it fires where the unit is facing and not towards the target.
I used that exact tutorial to begin using colliding projectiles. In fact, if you copy the second ability (plasma surge, I think) exactly as is, it should do precisely what you're asking.
One thing I've learned is to touch movers very little. They're finicky and hard to understand. The effects themselves will allow for the missile to travel past targeted or impacted units.
The basic idea is that the weapon begins an "initial" effect (a persistent one) that fires the launch effect toward the direction of the targeted unit. And if you don't destroy the persistent once it successfully finds a target, it will keep travelling past it. If you follow the steps of the plasma surge ability by setting up the markers system correctly, the missile shouldn't hit the same enemy multiple times as it travels through them. And once it reaches the targeted point (set by the offset in the "Initial" effect) it should Destroy the Persistent searching effect, then Suicide the missile itself to get rid of it.
I'd suggest starting from scratch and making the Plasma Surge ability exactly as the tutorial describes, then once it's working you can fiddle with all the individual aspects of it to learn how they work and how to modify it in new and exciting ways!
Anyway, best of luck! That tutorial was extremely helpful to me when I first started using these types of projectiles and now pretty much every game I make uses them almost extensively!
(Warning, shameless plug incoming: If you want an example of the kinds of things I've been able to do with the basics outlined in that tutorial, check out the map "Airstrike." It uses pretty much extensively these kinds of projectiles in fun and varied ways. If you're curious how any of them work, just let me know and I'll do my best to explain!)
Hi all!
I need help with getting collidable missiles to travel PAST my target. I followed the fireball spell (but changed it into a weapon) in this tutorial:
http://www.sc2mapster.com/forums/resources/tutorials/17154-data-colliding-projectiles/
The colliding missile is working fine. It collides with units on its way to the target, damages them, destroys the missile, and creates an impact effect. However, I want the missile to keep travelling past the target and be able to collide with units past the target too. It's more a matter of getting the mover to keep the missile moving. Right now I have the weapon firing 9 missiles at a random offset near the targeted unit's location with the Thor AA mover, which has only one motion phase. Its driver is guidance and works fine getting to the offset near the target and some shots are supposed to miss. However, when it reaches the targeted point without colliding with any unit the missile just sits there and spins erratically until a timeout behavior I put on the ammo unit kills it. While the missile is spinning enemy units can move into the missile and collide with it and take damage.
I'm thinking that I would need to add a motion phase with driver throw after the guidance phase is done that keeps it moving or change the first motion phase's driver to throw, but I have no clue as to how the throw driver works in movers. I have already tried changing the mover's driver to throw but it always fires south towards the bottom of the map, probably because I have no idea how it works.
Any help/advice/knowledge about this would be greatly appreciated!
@lilpod13: Go
does this wall of text mean, that you want a missile to go straight into one direction and just damage every unit on its way?
I want the missile to be able to go PAST the unit that is being targeted for the weapon. Something like this:
One game that uses the same idea in SC2 is mission frontier. All of the non-homing weapons shoot at the target's position and travel past the target if they miss.
@lilpod13: Go
what i said
put an persistant effect infront of the launch effect of the weapon. this persistant effect is created with an offset to the target (max travel distance of your projectile). now change the target of your launch effect to the persistant effect and connect the persistant effect with the launch effect (set phase counter to 1 and add the launch effect to periodic effects).
now you still need a collision detector. this is basically a behaviour that periodically checks if a unit is close, if close deal dmg.
(behaviour - periodic effect - search effect - dmg)
@FunkyUserName: Go
Wow ^-^ this actually helped me more than i thought!
@Sendlirn: Go
rly? i see no like. no like == not helpful
@FunkyUserName: Go
I figured out what to do with Funky's help and this thread:
http://www.sc2mapster.com/forums/development/data/56118-missile-that-will-fly-to-the-edge-of-the-map/
I tried what you suggested first FunkyUserName but the missiles wouldn't launch from the unit when I set the impact location to the persistent and I decided to try something else. I changed the mover to have 2 motion phases. The first motion phase uses guidance to move the missile in the direction of the offset point (the timeout of this phase is .0625 ). The second motion phase uses throw and makes the missile continue in the direction that was set by the guidance phase. I also set the throw vector's Y property to -1 (not sure if this is important or not)
Thanks for the help FunkyUserName! :)
Edit: I just had it working and I broke it somehow :( Trying to fix...
Can't seem to fix it. Closest I got to it working was putting another phase after guidance that had no driver but the missiles had a tendency to change directions and speed
Edit #2: What's causing the missiles to explode on the point of offset has to be from the guidance motion phase. With only the throw phase the missile works fine but it fires where the unit is facing and not towards the target.
@lilpod13: Go
a missilie destroys itself if it considers itself at the target
Hey there!
I used that exact tutorial to begin using colliding projectiles. In fact, if you copy the second ability (plasma surge, I think) exactly as is, it should do precisely what you're asking.
One thing I've learned is to touch movers very little. They're finicky and hard to understand. The effects themselves will allow for the missile to travel past targeted or impacted units.
The basic idea is that the weapon begins an "initial" effect (a persistent one) that fires the launch effect toward the direction of the targeted unit. And if you don't destroy the persistent once it successfully finds a target, it will keep travelling past it. If you follow the steps of the plasma surge ability by setting up the markers system correctly, the missile shouldn't hit the same enemy multiple times as it travels through them. And once it reaches the targeted point (set by the offset in the "Initial" effect) it should Destroy the Persistent searching effect, then Suicide the missile itself to get rid of it.
I'd suggest starting from scratch and making the Plasma Surge ability exactly as the tutorial describes, then once it's working you can fiddle with all the individual aspects of it to learn how they work and how to modify it in new and exciting ways!
Anyway, best of luck! That tutorial was extremely helpful to me when I first started using these types of projectiles and now pretty much every game I make uses them almost extensively!
(Warning, shameless plug incoming: If you want an example of the kinds of things I've been able to do with the basics outlined in that tutorial, check out the map "Airstrike." It uses pretty much extensively these kinds of projectiles in fun and varied ways. If you're curious how any of them work, just let me know and I'll do my best to explain!)
rut
@rutegar: Go
Thank you! Got it working exactly as I want it (even got the spread going)! :D
And the long journey of making a space map begins...