"Actor Toss"

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
Gibs
 
Posts: 19
Joined: Wed Oct 10, 2012 8:37 am
Location: USA

"Actor Toss"

#1

Post by Gibs » Thu Apr 14, 2016 11:50 am

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?
Last edited by Gibs on Thu Apr 14, 2016 11:58 am, edited 1 time in total.

User avatar
Sean
IRC Operator
Posts: 982
Joined: Thu Jan 16, 2014 9:09 pm
Location: United Kingdom
Clan: Zandronum
Clan Tag: [Za]
Contact:

Re: "Actor Toss"

#2

Post by Sean » Thu Apr 14, 2016 11:51 am

<capodecima> i dont say any more word without my loyer jenova

User avatar
Gibs
 
Posts: 19
Joined: Wed Oct 10, 2012 8:37 am
Location: USA

Re: "Actor Toss"

#3

Post by Gibs » Thu Apr 14, 2016 11:58 am

kk ill tinker with it somemore thanks!

User avatar
Fused
Contributor
Posts: 683
Joined: Sat Nov 09, 2013 9:47 am
Location: Netherlands
Contact:

Re: "Actor Toss"

#4

Post by Fused » Thu Apr 14, 2016 2:08 pm

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.
My mods
Image Image

My socials
Image Image

User avatar
CloudFlash
Zandrone
Posts: 1074
Joined: Mon Jun 04, 2012 5:35 pm
Location: Wonderland (except not really)

Re: "Actor Toss"

#5

Post by CloudFlash » Thu Apr 14, 2016 2:45 pm

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

User avatar
SwordGrunt
Forum Regular
Posts: 377
Joined: Thu Jun 07, 2012 8:43 pm

Re: "Actor Toss"

#6

Post by SwordGrunt » Thu Apr 14, 2016 3:09 pm

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

User avatar
Gibs
 
Posts: 19
Joined: Wed Oct 10, 2012 8:37 am
Location: USA

Re: "Actor Toss"

#7

Post by Gibs » Fri Apr 15, 2016 1:22 am

thank you all for the advice! :igor:
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.

Post Reply