I am making an ability that can be cast on just about any unit, and when it impacts, it pushes the unit back. Of course, due to the weird mechanics of apply force effects, using forces to move a unit doesn't stop it from turning in the direction its being pushed, nor does it stop the unit from playing its walk animation. If you want a legit pushback mechanic, this results in it looking incredibly tacky. I solved the first problem by using the "suppress turning" flag in the behavior, but im not sure about the 2nd. I know how to pause an individual actor's animation, but if I did it that way, I'd have to do that for the actor of every single unit in the game that could be affected by this ability. Is there a way to make the force effect send an actor message to the affected unit's actor without the individual-extremely-tedious approach?
You can use an attached actor created by the behavior and make it send a message to the unit actor via the Target - field (the topmost field when selecting the actor message, usually it is empty). To get the main unit actor, use ::Main or _Selectable.
Thanks guys. I ended up solving the problem using an event macro. Also turns out that when the "suppress movement" flag is checked, the unit cannot be pushed or pulled.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I am making an ability that can be cast on just about any unit, and when it impacts, it pushes the unit back. Of course, due to the weird mechanics of apply force effects, using forces to move a unit doesn't stop it from turning in the direction its being pushed, nor does it stop the unit from playing its walk animation. If you want a legit pushback mechanic, this results in it looking incredibly tacky. I solved the first problem by using the "suppress turning" flag in the behavior, but im not sure about the 2nd. I know how to pause an individual actor's animation, but if I did it that way, I'd have to do that for the actor of every single unit in the game that could be affected by this ability. Is there a way to make the force effect send an actor message to the affected unit's actor without the individual-extremely-tedious approach?
Supress Movement flag on the behaviour? Try an Effect event with a term at unit.
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
You can use an attached actor created by the behavior and make it send a message to the unit actor via the Target - field (the topmost field when selecting the actor message, usually it is empty). To get the main unit actor, use ::Main or _Selectable.
Thanks guys. I ended up solving the problem using an event macro. Also turns out that when the "suppress movement" flag is checked, the unit cannot be pushed or pulled.