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 
 
SetCreatureEventHandler

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development
View previous topic :: View next topic  
Author Message
xorbaxian



Joined: 18 Dec 2007
Posts: 45

PostPosted: Mon Mar 08, 2010 3:20    Post subject: SetCreatureEventHandler Reply with quote

just wondering if this works for pc's? i want to trap the OnSpellCastAt() event for pc's.

thanks.
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Mon Mar 08, 2010 10:51    Post subject: Reply with quote

Yes, but most events don't work on PCs.
_________________
In Soviet Russia, NWN plays you!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
xorbaxian



Joined: 18 Dec 2007
Posts: 45

PostPosted: Mon Mar 08, 2010 13:30    Post subject: Reply with quote

virusman wrote:
Yes, but most events don't work on PCs.
ah. why's that? is the signal dropped somewhere along the way, or are the events just not generated for pc's?
Back to top
View user's profile Send private message
ArielT



Joined: 26 Jan 2010
Posts: 30

PostPosted: Mon Mar 08, 2010 13:38    Post subject: Reply with quote

If this doesn't work, you can use the spellhook script and just have it check whether the target is a PC, if so, have it execute your script.
Back to top
View user's profile Send private message MSN Messenger
xorbaxian



Joined: 18 Dec 2007
Posts: 45

PostPosted: Mon Mar 08, 2010 16:55    Post subject: Reply with quote

ArielT wrote:
If this doesn't work, you can use the spellhook script and just have it check whether the target is a PC, if so, have it execute your script.
yah, already tried that, actually. i'm trying to hook an event which doesn't seem to pass by the spellhook: the healing kit 'spell'. it definitely signals onspellcastat() cuz i can catch it for npc's, but it seems to be a little trickier for pc's.

thx for the suggestion tho. Smile
Back to top
View user's profile Send private message
ArielT



Joined: 26 Jan 2010
Posts: 30

PostPosted: Tue Mar 09, 2010 9:42    Post subject: Reply with quote

xorbaxian wrote:
ArielT wrote:
If this doesn't work, you can use the spellhook script and just have it check whether the target is a PC, if so, have it execute your script.
yah, already tried that, actually. i'm trying to hook an event which doesn't seem to pass by the spellhook: the healing kit 'spell'. it definitely signals onspellcastat() cuz i can catch it for npc's, but it seems to be a little trickier for pc's.

thx for the suggestion tho. Smile
Hrm... Neat. I figured you would need a custom hook for this.
Back to top
View user's profile Send private message MSN Messenger
Zebranky



Joined: 04 Jun 2006
Posts: 415

PostPosted: Wed Mar 10, 2010 17:12    Post subject: Reply with quote

Healing kit behavior is hardcoded, and there's currently no way to override it via script. It does trigger the spell cast event, but that particular spell ID just invokes the hardcode function (more or less -- I haven't actually looked at that part of the code, but I know it can't be overridden from script).

Win32 nwnx_fixes allows you to tweak a couple elements of healing kit behavior. I forget if I ever ported that to Linux.
_________________
Win32 SVN builds: http://www.mercuric.net/nwn/nwnx/

<Fluffy-Kooshy> NWNx plugin is to this as nuclear warheads are to getting rid of fire ants.

<ThriWork> whenever I hear nwn extender, I think what does NWN need a penis extender for?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development 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