Return to sender Projectiles

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

Return to sender Projectiles

#1

Post by Gibs » Wed Apr 20, 2016 7:54 am

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 <3 (btw projectile and ammo are using the same sprite).

User avatar
ZZYZX
Posts a lot
Posts: 742
Joined: Thu Jun 07, 2012 5:56 pm
Location: Ukraine
Clan: A3
Clan Tag: [A3]

Re: Return to sender Projectiles

#2

Post by ZZYZX » Wed Apr 20, 2016 9:57 am

Seen something similar in Necromancer mod.
http://www.[bad site]/download?file=necromancer.wad

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

Re: Return to sender Projectiles

#3

Post by SwordGrunt » Wed Apr 20, 2016 1:39 pm

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.

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

Re: Return to sender Projectiles

#4

Post by Gibs » Thu Apr 21, 2016 5:51 am

I decided to have the projectile die(explode) and just refill inventory upon death state. thank you for you input as always.

Post Reply