View previous topic :: View next topic |
Author |
Message |
xorbaxian
Joined: 18 Dec 2007 Posts: 45
|
Posted: Mon Mar 08, 2010 3:20 Post subject: SetCreatureEventHandler |
|
|
just wondering if this works for pc's? i want to trap the OnSpellCastAt() event for pc's.
thanks. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Mon Mar 08, 2010 10:51 Post subject: |
|
|
Yes, but most events don't work on PCs. _________________ In Soviet Russia, NWN plays you! |
|
Back to top |
|
|
xorbaxian
Joined: 18 Dec 2007 Posts: 45
|
Posted: Mon Mar 08, 2010 13:30 Post subject: |
|
|
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 |
|
|
ArielT
Joined: 26 Jan 2010 Posts: 30
|
Posted: Mon Mar 08, 2010 13:38 Post subject: |
|
|
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 |
|
|
xorbaxian
Joined: 18 Dec 2007 Posts: 45
|
Posted: Mon Mar 08, 2010 16:55 Post subject: |
|
|
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. |
|
Back to top |
|
|
ArielT
Joined: 26 Jan 2010 Posts: 30
|
Posted: Tue Mar 09, 2010 9:42 Post subject: |
|
|
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. | Hrm... Neat. I figured you would need a custom hook for this. |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Wed Mar 10, 2010 17:12 Post subject: |
|
|
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 |
|
|
|