Inside3D!
     

drop item when hit

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
ajay



Joined: 29 Oct 2004
Posts: 295
Location: Swindon, UK

PostPosted: Thu Feb 03, 2005 2:24 pm    Post subject: drop item when hit Reply with quote

I'd like to get an npc to drop something (like dropbackpack, I've got a routine to do that, called dropit() ) once each time it's been hit by a player's attack?

Any ideas?

cheers

ajay
_________________
my site
Back to top
View user's profile Send private message MSN Messenger
Wazat



Joined: 15 Oct 2004
Posts: 732
Location: Middle 'o the desert, USA

PostPosted: Thu Feb 03, 2005 3:57 pm    Post subject: Reply with quote

Yes. In the NPC's th_pain function just call the function to drop the item. Put that function call at the very top and it'll drop items every time it's attacked.
_________________
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
Back to top
View user's profile Send private message MSN Messenger
r00k



Joined: 13 Nov 2004
Posts: 483

PostPosted: Fri Feb 04, 2005 5:16 am    Post subject: Reply with quote

TRue wazat but remmember that with nailgun or lg the pain frames are refreshed ever 0.2 seconds, he should actually put a delay in there so that its not like droping too many entities!
Back to top
View user's profile Send private message
ajay



Joined: 29 Oct 2004
Posts: 295
Location: Swindon, UK

PostPosted: Fri Feb 04, 2005 3:17 pm    Post subject: Reply with quote

Wazat wrote:
Yes. In the NPC's th_pain function just call the function to drop the item. Put that function call at the very top and it'll drop items every time it's attacked.


Thanks, works perfectly.
Cheers,
ajay
_________________
my site
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group