Can Trigger Editor affect Movers in Data Editor?

Builder Bob

Live free or don't
Reaction score
249
I'm currently experimenting with movers as projectiles. They're great and all, but I can't help but be disappointed with being stuck with static projectile weapons. I'd like to change them in the trigger editor. Is it at all possible?

Example scenario why it is so important for me: I have a unit moving at high speed shooting a projectile. The projectile should have a start velocity equal to the unit, but it doesn't.

Anyone have a solution?
 

DarkRevenant

Mad Scientist
Reaction score
13
To cover the maximum velocity, use Set/Modify Unit Movement Speed.

I don't know of a perfect method of the minimum velocity. The trouble is it's rather hard to even determine the current velocity of the unit that is firing the shots, unless you're triggering the movement. You pretty much need a periodic system for that, tracking the unit's position over time to come up with an actual velocity. You could have some copies of a behavior that applies a copy of a constant-velocity mover, so you can apply those behaviors in order to attain more-or-less the current velocity of the unit. I.E. a unit moving at 4.6 units per second would need four 1-speed movers, a 0.5-speed mover, and a 0.1-speed mover, or something.
 

Builder Bob

Live free or don't
Reaction score
249
To cover the maximum velocity, use Set/Modify Unit Movement Speed.

I don't know of a perfect method of the minimum velocity. The trouble is it's rather hard to even determine the current velocity of the unit that is firing the shots, unless you're triggering the movement. You pretty much need a periodic system for that, tracking the unit's position over time to come up with an actual velocity. You could have some copies of a behavior that applies a copy of a constant-velocity mover, so you can apply those behaviors in order to attain more-or-less the current velocity of the unit. I.E. a unit moving at 4.6 units per second would need four 1-speed movers, a 0.5-speed mover, and a 0.1-speed mover, or something.

Alright, this looks promising!

I actually am moving the unit periodically, so I know the exact velocity of the unit firing. I don't know how to apply the behavior modifiers to the movers though. How do I do that?

Edit: Problem is; I can't find any functions similar to the PickAllUnitsInRange type functions that were common to use in Warcraft 3. All area searches seem to be handled in the Data Editor, and since this part of the editor cannot reference variables made in the Trigger Editor, I'm stuck with no way to connect the two.

Edit2: I think I'm getting the hang of it now. I can cast Search Area effects from the trigger editor to apply the buffs. Not as hard as I first thought. My last problem is to actually make the buff increase the speed of the mover. So many fields to navigate through in the behavior modification field. This is gonna take some time.

Edit3: I'm unable to figure out how to change the speed of a mover with an applied behavior. I am able to modify speed for units, but not mover. It has to be possible though. How else would they have made the Time Bomb spell which slowed down missiles in the alpha and very early beta build?
 
Reaction score
54
If you use
Trigger:
  • Events
    • Unit - Any Unit creates a unit with Any or Any


you can refer to the missile with Created Unit, and to the launching unit as Triggering Unit. Then you can proceed to modify the speed of the missile as you wish.

Movers are merely functions that dictate how a unit's position (x,y,z) changes per state refresh. I wouldn't look too hard into modifying them dynamically. The Catalog action would do it, but I have a feeling they are read-only values.

Never seen the Time Bomb spell, but it sounds like it could employ the Time Scale buff modification.
 

Builder Bob

Live free or don't
Reaction score
249
Hmmm... this is odd.

I was able to catch the movers with a 'Unit - Any Unit Enters (Entire map)' event. They don't react to move unit instantly though... I will have to test more with them later. I'm out of time for now.

Edit: I've gone back to try to rethink my approach. What if I instead of trying to affect the movers after shooting them try to design the movers in such a way that they naturally work the way I want them to.

Here's what I'm thinking. Maybe there's a way to set the movers so instead of having a set amount of acceleration and speed, they have a fixed amount of time to live and adjust their speed according to the distance I want them to travel. I don't know if it's possible, but I've had some small indications of getting close to something like it so far.

Edit2: Success!

Making a mover with a Ballistic driver makes the mover adjust the speed to always last for the duration of flight time. I can then just create the effect to go the correct distance over those 0.1 seconds and everything works out.

Thanks for your help
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top