I've got a custom Tank unit which players can control by entering with their Survivor Hero. I'd like to create a Weapon which will only 'fire' when moving, killing anything hostile if it gets too close to the tank. The reason I need this is because I set my Tank Cannon to a minimum range of 5, because anything closer looks 'derpy'.
I'd like the weapon to not auto-target units and move towards them, but rather just 'crush' them whenever the vehicle is moving.
Add a Buff behavior to the unit, set the Period to 0.25 or so, set Effect - Periodic to a stock AoE damage system.
Either use a damage effect with an AoE, or a Search effect which then applies the damage to each unit individually. The latter is better for adding things like individual blood splats I think, and might also be needed if you intend to use the Kill flag for an instant kill.
I think there's a validator for "caster is stationary" in the editor already, which should be easy to invert, add that to the Validators (Disable) field on the buff.
Look at my LEGZ map in my data assets for all the systems needed. You can do damage when mvoing damage when turning and distinguish it from damage on attack.
I was using the default SCII Caster Is Stationary, however it isn't working. (I put it in Validators (Disable) under the Behavior as suggested by Photoloss, just realized it says if it returns as false.)
I'll try your suggestion now.
EDIT: Got it to work, however it still kills itself. :|
I've excluded self in Target Filters, and Search Exclude Caster... I'll keep trying. (Thanks for pointing me in the right direction.)
Are you using a search effect or an AoE damage effect? For the latter you might want to make it occur at Caster Point or Target Point, as the Target Unit would also be the tank itself.
If you're using a search effect, try adding Caster and/or Target to the Exclude field, though the search filter should do it.
Considering the nature of your map, are Player and Ally still included in the search filter?
Seems like it makes no difference where they Target Point is, or how much I disable from damaging. I even stopped it from damaging Mechanical units and it still killed itself. I frankly have no idea, I set the periodic effect within the behavior to the AOE Damage, should I perhaps make it a Search For Enemies around effect and then damage them? And if I did, how would I do that?
Have you tried removing the damage effect altogether to make sure that's actually causing the problem? Is the Buff applied through something other than the Behavior: Behaviors+ field on the unit itself?
The search-based solution simply replaces the AoE damage effect with a Search Area effect (in the Periodic Effect field on the Buff/Persistent), and this search is then made to apply a single-target damage effect through the Areas+ field. This has some advantages regarding visual effects and specialised damage responses, with the obvious drawback of using twice the number of effects.
I've been dying for someone to ask me about that XD. But yea I'm stationed in Antarctica for another 2 weeks at Mcmurdo station for vehicle maintenance.
Is it still an AoE damage effect only? Try using a search effect instead and apply all filters and area values to that one instead of the damage effect. I think there were some problems using damage effects only. Did you try that yet?
Why do people always reply to my posts with a one-liner answering a peripheral question, without trying or even acknowledging the concrete suggestions?
I've got a custom Tank unit which players can control by entering with their Survivor Hero. I'd like to create a Weapon which will only 'fire' when moving, killing anything hostile if it gets too close to the tank. The reason I need this is because I set my Tank Cannon to a minimum range of 5, because anything closer looks 'derpy'.
I'd like the weapon to not auto-target units and move towards them, but rather just 'crush' them whenever the vehicle is moving.
Is there a way to make this weapon?
Tank Model Credit: sgtnoobkilla
Add a Buff behavior to the unit, set the Period to 0.25 or so, set Effect - Periodic to a stock AoE damage system.
Either use a damage effect with an AoE, or a Search effect which then applies the damage to each unit individually. The latter is better for adding things like individual blood splats I think, and might also be needed if you intend to use the Kill flag for an instant kill.
I think there's a validator for "caster is stationary" in the editor already, which should be easy to invert, add that to the Validators (Disable) field on the buff.
Look at my LEGZ map in my data assets for all the systems needed. You can do damage when mvoing damage when turning and distinguish it from damage on attack.
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
Got it to work, how would I make a Validator that checks if the Caster is neutral?
Then if it is neutral, I can put it in Validators (Disable) on my Trample ability.
Also I put Caster is Stationary on the Validators (Disable), it still activates when idle.
In the Effect, I've set the Exclude to Caster. It still kills itself.
@Alnatair: Go
In the search area set Self to excluded... On a side note did you get a multiperson vehicle system working?
@JacktheArcher: Go
Check the Vehicles Post, Photoloss is planning to upload the maps. Yes we did.
Also, in Search Area... Self is excluded.
(Off topic: If it's not a joke, where are you in Antarctica?)
I made this before, but I used a Caster Is Moving or Caster Movement Speed validator. (speed > 0)
@zorbotron: Go
I was using the default SCII Caster Is Stationary, however it isn't working. (I put it in Validators (Disable) under the Behavior as suggested by Photoloss, just realized it says if it returns as false.)
I'll try your suggestion now.
EDIT: Got it to work, however it still kills itself. :|
I've excluded self in Target Filters, and Search Exclude Caster... I'll keep trying. (Thanks for pointing me in the right direction.)
RIGHT! So I'm going to continue testing tomorrow. I'm being pried away from my compute-
Are you using a search effect or an AoE damage effect? For the latter you might want to make it occur at Caster Point or Target Point, as the Target Unit would also be the tank itself.
If you're using a search effect, try adding Caster and/or Target to the Exclude field, though the search filter should do it.
Considering the nature of your map, are Player and Ally still included in the search filter?
No they are not.
Also, it is an AOE Damage Effect. The targeted point is Caster Point. I'll try Target Point.
Seems like it makes no difference where they Target Point is, or how much I disable from damaging. I even stopped it from damaging Mechanical units and it still killed itself. I frankly have no idea, I set the periodic effect within the behavior to the AOE Damage, should I perhaps make it a Search For Enemies around effect and then damage them? And if I did, how would I do that?
Have you tried removing the damage effect altogether to make sure that's actually causing the problem? Is the Buff applied through something other than the Behavior: Behaviors+ field on the unit itself?
The search-based solution simply replaces the AoE damage effect with a Search Area effect (in the Periodic Effect field on the Buff/Persistent), and this search is then made to apply a single-target damage effect through the Areas+ field. This has some advantages regarding visual effects and specialised damage responses, with the obvious drawback of using twice the number of effects.
It's only being applied via Behavior: Behaviors+, I can always check.
I may look at what EnergyNovaSet does, copy that, then just reduce the radius and effect.
It's exactly what I want for the weapon, minus the visuals and burning damage afterwards.
@Alnatair: Go
I've been dying for someone to ask me about that XD. But yea I'm stationed in Antarctica for another 2 weeks at Mcmurdo station for vehicle maintenance.
@JacktheArcher: Go
Neato.
Military, or just a Scientist/Engineer?
Is it still an AoE damage effect only? Try using a search effect instead and apply all filters and area values to that one instead of the damage effect. I think there were some problems using damage effects only. Did you try that yet?
@Ousnius: Go
@Alnatair: Go
Why do people always reply to my posts with a one-liner answering a peripheral question, without trying or even acknowledging the concrete suggestions?
@Ousnius: Go
I have the effect, I can easily swap it out with the Search in the Periodic Effect.
I just don't know how to make the Search effect then apply damage to any enemies or neutrals.
Err, apply the damage effect through the Areas+ field, just like any Search effect ever?
If you are new to the editor then please try and find such information on the wiki, at least the common essentials are well documented at this point.