[DECORATE] Quick Question: Change an actor's velocity toward/away from another actor?

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
FranckyFox2468
Forum Regular
Posts: 180
Joined: Sat May 07, 2016 8:30 pm

[DECORATE] Quick Question: Change an actor's velocity toward/away from another actor?

#1

Post by FranckyFox2468 » Tue Jan 30, 2018 2:28 am

Cause i was testing ways to gravitate enemies toward something, the obvious solution was reverse a_radiusthrust. But the problem with this option is that even allied characters/players are being pulled, which is kind of shitty in a team/co-op game.

So my idea was to perhaps make an item with a_changevelocity or use an ACS that changes the velocity of an actor to push it toward a TID actor or a character's target or etc. But my question is... would that even be possible? Cause i've seen instances of a_recoil or a_changevelocity using certain actor values but im wondering if it would be possible to pull an actor toward another.

Cause i've been looking around and never managed to find something of that sort but never found confirmation it wasn't possible either, because there are many decorate/acs expressions that aren't necessarily talked about but suddently learn of upon checking some mods.

User avatar
Ænima
Addicted to Zandronum
Posts: 3523
Joined: Tue Jun 05, 2012 6:12 pm

[DECORATE] Re: Quick Question: Change an actor's velocity toward/away from another actor?

#2

Post by Ænima » Tue Feb 13, 2018 1:05 am

Yeah you can do it with TID’s, ACS thrust/actor-velocity-setting functions, and some maths.
­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­
Doom64: Unabsolved: New weapons, monsters, and gameplay features for coop !


ZandroSkins
: a pack made by our community

Konda
Forum Regular
Posts: 487
Joined: Thu Jun 07, 2012 5:22 pm

[DECORATE] Re: Quick Question: Change an actor's velocity toward/away from another actor?

#3

Post by Konda » Tue Feb 13, 2018 6:26 pm

I'm too lazy to make this work but I know of an ACS function that will be useful in pulling this off: https://zdoom.org/wiki/VectorAngle

Post Reply