Page 1 of 1
"Actor Toss"
Posted: Thu Apr 14, 2016 11:50 am
by Gibs
Is there a possible workaround to have a spawned actor thrust itself in a random direction at a given force?
ive tied thrust thing but it didn't do anything possibly recoil?
Re: "Actor Toss"
Posted: Thu Apr 14, 2016 11:51 am
by Sean
Re: "Actor Toss"
Posted: Thu Apr 14, 2016 11:58 am
by Gibs
kk ill tinker with it somemore thanks!
Re: "Actor Toss"
Posted: Thu Apr 14, 2016 2:08 pm
by Fused
A negative A_recoil value can move it forward. If you want to set the same random value for each recoil, you should probably use user variables.
http://zdoom.org/wiki/User_variable
Just keep in mind it wont work on weapons.
Re: "Actor Toss"
Posted: Thu Apr 14, 2016 2:45 pm
by CloudFlash
Or you could try fiddling with a_recoil coupled with a_setangle(random(0,360)).
Dunno if it'll work the way you want tho
Re: "Actor Toss"
Posted: Thu Apr 14, 2016 3:09 pm
by SwordGrunt
A_Recoil, A_ChangeVelocity, ThrustThing are all valid options
For the first you'll need to change its angle to a random value before applying the recoil
Note that A_ChangeVelocity heavily desyncs online in the current Zandronum so if using that, make sure you use args or user variables to store the randomized velocity, then apply it on the codepointer. This indirect method ensures it does not desync
Re: "Actor Toss"
Posted: Fri Apr 15, 2016 1:22 am
by Gibs
thank you all for the advice!

Im having an actor (ball) hit a player, die, spawn inventory (same ball sprite) then fling said inventory as if it was the original object bouncing off.