logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
onHit effect

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules
View previous topic :: View next topic  
Author Message
Valgav



Joined: 28 Aug 2010
Posts: 53

PostPosted: Mon Feb 16, 2015 23:40    Post subject: onHit effect Reply with quote

I'm trying to implement some custom poisons system using local viariables on object and have problem with applying effects. Sure, there's x2_inc_switches + unique power (on hit), but it's tagebase and I need to enable that to all weapons.

First I was thinking about attack event from nwnx_event, but it doesn't store information about weapon so now my only idea to solve this is to use SetTag() from nwnx_funcs when applying poison and then restore original tag in onhit script.

It's clumsy and I have to add extra item property every time so I'm looking for some simple and elegant solution.
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Thu Feb 19, 2015 17:35    Post subject: Reply with quote

nwnx_cool
I added an ondamage hook.
You could modify this to fire your desired effect when a hit is detected.

It fires even if damage is 0
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules All times are GMT + 2 Hours
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 © 2001, 2005 phpBB Group