Page 1 of 1
Return to sender Projectiles
Posted: Wed Apr 20, 2016 7:54 am
by Gibs
is it possible to have an actor(projectile) that spawns ammo during its death state have that spawned actor(ammo) "physically" return to the owner who created it? (I know you can add inventory during states but I'm looking to have sort of a boomerang look (projectile shot, kills opponent, then return to owner) lol. your help is much appreciated

(btw projectile and ammo are using the same sprite).
Re: Return to sender Projectiles
Posted: Wed Apr 20, 2016 9:57 am
by ZZYZX
Re: Return to sender Projectiles
Posted: Wed Apr 20, 2016 1:39 pm
by SwordGrunt
The easiest way would be to use A_GiveToTarget to give the owner ammo, and shooting a projectile towards the owner to show the ammo physically returning to him (even though he already received it on impact).
If you want to make it so the player only gets ammo when the projectile returns to him, it'd be equally as easy in Zan 3.0+ but right now you'd need a custom damagetype on the projectile and a custom painstate for said damagetype on your player class, in which he receives said ammo.
Re: Return to sender Projectiles
Posted: Thu Apr 21, 2016 5:51 am
by Gibs
I decided to have the projectile die(explode) and just refill inventory upon death state. thank you for you input as always.