I would appreciate help with a custom missile. Currently, it launches fine, veering left, damaging any units it encounters as it moves, and finally vanishing - just the way I want it to...
Now, I wish to add two abilities to the caster:
1. Increases the size of the missile's arc and the distance it travels.
2. The opposite, decreasing arc and distance.
It gets a little bit more complicated, because players can use these abilities to adjust the arc and distance in increments (there will be a total of 13 different increment settings).
Basically, click the 'Decrease Range' button, and the missile's arc and the distance traveled is decreased by a small amount. Click the button a second time, and it decreases a little bit more. Click the 'Increase Range' button, and it increases.
Ideally, it could increase/decrease on the fly (i.e. clicking a button causes the missile to adjust its movement even while flying, ergo not requiring an interruption or pause).
Any thoughts about this? Let me know if you need more info.
Here are a couple of pics to illustrate what I mean:
Normal missile movement:
Increased range:
I came up with a hypothetical idea, but am highly skeptical (I have yet to test because it is rather complex): You click the 'Increase Range' button, and this sets it up so that any missile that is launched from the caster is now given a certain buff. Say it is Buff A. Meanwhile, Sear Area A is constantly checking around the caster for units with this buff. When found, Apply Force A is applied to the unit, in this case pushing the missile a little further out. There will have to be about 13 different buffs, search areas and apply force effects, one for each different possible increment. If you click the 'Increase Range' button again, it will set it up so that any missiles that are launched now have a new buff: Buff B. Search Area B now selects the unit, and Apply Force B is applied... you get the idea.
Any ideas or suggestions are more than welcome! Many thanks in advance!
Seems you are after various different lob Movers for your missiles. One way I can think of is to give your increment/decrement a hidden behavior to count which a Unit Compare Behavior Count validator uses. The increment/decrement adds one to the stack while the other removes one from the stack. Get your ability to use a Set effect that has the Missile Launch effect for all trajectories but has Effect - Validators set to your behaior count validator.
That way only when the behavior stack count is = to n does that specific missile launch effect using a specific mover function while all the others are supressed.
Does "apply force" even work on missiles? Iirc my tests with Maar's Psi Shockwave suggested it doesn't.
If not do what DrSuperEvil said. That also has the advantage of beig able to assign each missile its own unique trajectory instead of simply pulling/pushing from the caster.
To my knowledge anything you can do with a missile in flight has to use the caster's position and facing or that of the missile. The former would simply be firing a new missile with the new arc and killing off the old one (not good). The latter would mean killing off the missile and launching a new one from the location of the old missile. However the game doesn't know where the missile was on its "arc", so the only truly feasible options are making the new missile fly in a straight line, or home in on the target.
Wow, you're awesome - great idea, I'll give it a test. Thanks!
One thing - I don't know how to ensure that all the newly launched missiles have the specified Behavior... it seems to me that applying the Behavior via a click of the increment/decrement buttons would only work for the missile that is currently in existence, so once it vanishes the new missile would be the standard unit, devoid of the Behavior... Would a Create Persistent -> Apply Behavior be able to constantly apply the Behavior to new missiles (and without stacking disproportionately)?
Yeah, I guess you're right, I haven't had any success with the *apply force* effect yet.
It's too bad that you can't alter the movement in-flight. Is there any way to modify a mover or a unit's turn radius with an ability? Perhaps a fake dummy *unit* could be used instead of a missile... with fly-type movement and waypoints offset from the caster to determine it's movement...
There's a "launch effect" field in the launch missile effect type, which applies an effect to the missile (which is also considered the Source of that effect)
However you aren't supposed to apply the effect to the missile, you're supposed to add buff stacks to the Caster, and validate the number of stacks on him. Your set effect attempts to launch all 13 missiles, but you'll set it up so 12 of the Validators return "false", so only 1 missile actually fires.
You can find missiles in mid-flight via search effect, but you'll need some fancy Validators to filter out the ones created by the caster. Even then the only thing you can do is kill them off.
You cannot modify Movers ingame afaik. The "dummy unit" setup would be very complicated and might encounter problems with longer ranges (think about it, the only unit that "swerves" when moving is the Mothership, and for that you have to get it to full speed, then order it to move to a point perpendicular to its current direction)
If you really want to include the midflight change I suggest you combine your previous ideas: make a dummy unit with actual pathing instead of a missile mover, give it some default movement commands, and use Apply Force to adjust the trajectory. You could give the dummy unit a persistent effect with a constant offset to make it go in a circle, then use the stacked Behaviors on the caster to accelerate the unit outwards. The persistent effect has to be hosted on the dummy unit and use its location+facing.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi,
I would appreciate help with a custom missile. Currently, it launches fine, veering left, damaging any units it encounters as it moves, and finally vanishing - just the way I want it to...
Now, I wish to add two abilities to the caster:
1. Increases the size of the missile's arc and the distance it travels.
2. The opposite, decreasing arc and distance.
It gets a little bit more complicated, because players can use these abilities to adjust the arc and distance in increments (there will be a total of 13 different increment settings).
Basically, click the 'Decrease Range' button, and the missile's arc and the distance traveled is decreased by a small amount. Click the button a second time, and it decreases a little bit more. Click the 'Increase Range' button, and it increases.
Ideally, it could increase/decrease on the fly (i.e. clicking a button causes the missile to adjust its movement even while flying, ergo not requiring an interruption or pause).
Any thoughts about this? Let me know if you need more info.
Here are a couple of pics to illustrate what I mean:
Normal missile movement:
Increased range:
I came up with a hypothetical idea, but am highly skeptical (I have yet to test because it is rather complex): You click the 'Increase Range' button, and this sets it up so that any missile that is launched from the caster is now given a certain buff. Say it is Buff A. Meanwhile, Sear Area A is constantly checking around the caster for units with this buff. When found, Apply Force A is applied to the unit, in this case pushing the missile a little further out. There will have to be about 13 different buffs, search areas and apply force effects, one for each different possible increment. If you click the 'Increase Range' button again, it will set it up so that any missiles that are launched now have a new buff: Buff B. Search Area B now selects the unit, and Apply Force B is applied... you get the idea.
Any ideas or suggestions are more than welcome! Many thanks in advance!
Seems you are after various different lob Movers for your missiles. One way I can think of is to give your increment/decrement a hidden behavior to count which a Unit Compare Behavior Count validator uses. The increment/decrement adds one to the stack while the other removes one from the stack. Get your ability to use a Set effect that has the Missile Launch effect for all trajectories but has Effect - Validators set to your behaior count validator.
That way only when the behavior stack count is = to n does that specific missile launch effect using a specific mover function while all the others are supressed.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Does "apply force" even work on missiles? Iirc my tests with Maar's Psi Shockwave suggested it doesn't.
If not do what DrSuperEvil said. That also has the advantage of beig able to assign each missile its own unique trajectory instead of simply pulling/pushing from the caster.
To my knowledge anything you can do with a missile in flight has to use the caster's position and facing or that of the missile. The former would simply be firing a new missile with the new arc and killing off the old one (not good). The latter would mean killing off the missile and launching a new one from the location of the old missile. However the game doesn't know where the missile was on its "arc", so the only truly feasible options are making the new missile fly in a straight line, or home in on the target.
@DrSuperEvil: Go
Wow, you're awesome - great idea, I'll give it a test. Thanks!
One thing - I don't know how to ensure that all the newly launched missiles have the specified Behavior... it seems to me that applying the Behavior via a click of the increment/decrement buttons would only work for the missile that is currently in existence, so once it vanishes the new missile would be the standard unit, devoid of the Behavior... Would a Create Persistent -> Apply Behavior be able to constantly apply the Behavior to new missiles (and without stacking disproportionately)?
@Photoloss: Go
Yeah, I guess you're right, I haven't had any success with the *apply force* effect yet.
It's too bad that you can't alter the movement in-flight. Is there any way to modify a mover or a unit's turn radius with an ability? Perhaps a fake dummy *unit* could be used instead of a missile... with fly-type movement and waypoints offset from the caster to determine it's movement...
There's a "launch effect" field in the launch missile effect type, which applies an effect to the missile (which is also considered the Source of that effect)
However you aren't supposed to apply the effect to the missile, you're supposed to add buff stacks to the Caster, and validate the number of stacks on him. Your set effect attempts to launch all 13 missiles, but you'll set it up so 12 of the Validators return "false", so only 1 missile actually fires.
You can find missiles in mid-flight via search effect, but you'll need some fancy Validators to filter out the ones created by the caster. Even then the only thing you can do is kill them off.
You cannot modify Movers ingame afaik. The "dummy unit" setup would be very complicated and might encounter problems with longer ranges (think about it, the only unit that "swerves" when moving is the Mothership, and for that you have to get it to full speed, then order it to move to a point perpendicular to its current direction)
If you really want to include the midflight change I suggest you combine your previous ideas: make a dummy unit with actual pathing instead of a missile mover, give it some default movement commands, and use Apply Force to adjust the trajectory. You could give the dummy unit a persistent effect with a constant offset to make it go in a circle, then use the stacked Behaviors on the caster to accelerate the unit outwards. The persistent effect has to be hosted on the dummy unit and use its location+facing.