View previous topic :: View next topic |
Author |
Message |
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Wed Jun 10, 2009 16:03 Post subject: More Functions |
|
|
Hello, I wrote this plugin for my own use but of course someone else can also have some purpose for using it.
In the near future I will add a few futures.
This realease functions:
Get/SetScript - Get/Set event script for Creature, Placeable, Module, Area, Door, Store, Trigger, Encounter.
I used the function from NWN engine, works even if currently the event field is empty.
CreateAreaTransitionOnLocation - This is little hack, function will create trap a change it into area transition trigger and use OnAreaTransitionClick script for jump.
(Current version 0.2.6) funcsext.tar.gz
Last edited by axs on Mon Jun 22, 2009 0:46; edited 5 times in total |
|
Back to top |
|
|
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Fri Jun 19, 2009 14:54 Post subject: |
|
|
Hm, no reports that I've screwed up.
Oh well, it's working now also with new function:
// Get surface material type from location
int GetSurface(location lLocation);
Last edited by axs on Sun Jun 21, 2009 15:41; edited 1 time in total |
|
Back to top |
|
|
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Sun Jun 21, 2009 20:23 Post subject: |
|
|
HOTFIX: Accidentally removed GetAnimation function implementation in public release.
update. Added new functions:
// Get current animation of oTarget
// Returned value isn't equal to nwscript constants, you need to check desired value for your own
int GetAnimation(object oTarget);
Timing Bar display like on rest or trap disarm.
Displayed message is hardcoded, so there is no text on bar called with this function.
Bar can't be canceled by player so you need to script it well.
// Display timing bar for creature and run sScript after delay
void StartTimingBar(object oCreature, int nSeconds, string sScript);
// Hide timing bar and run sScript if specified
void StopTimingBar(object oCreature, string sScript=""); |
|
Back to top |
|
|
Zunath
Joined: 06 Jul 2006 Posts: 183
|
Posted: Mon Jun 22, 2009 0:26 Post subject: |
|
|
Looks pretty cool. I'll have to check it out. |
|
Back to top |
|
|
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Mon Jun 22, 2009 0:45 Post subject: |
|
|
Hmm, it was very effective day
New update with new functions and few fixes:
// Remove gold from creature without feedback message
// Return: -1 on success, 0 on failure
int RemoveGold(object oCreature, int nGold);
// Remove item from creature inventory without feedback message
// Function will fail if oItem has no possessor
// Return: -1 on success, 0 on failure
int RemoveItem(object oItem);
// Apply nVFX at vPosition for oPC (Only specified PC will see visual effect)
void AreaVisualEffectForPC(object oPC, int nVFX, vector vPosition); |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Mon Jun 22, 2009 3:02 Post subject: |
|
|
Very nice tool to make many script systems more user-friendly. So although I'm win user thx for creating this plugin, amazing work. _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
Quixsilver
Joined: 20 Jan 2009 Posts: 30
|
Posted: Tue Jun 23, 2009 1:10 Post subject: |
|
|
Wow, those are some really nice functions...
axs wrote: |
// Apply nVFX at vPosition for oPC (Only specified PC will see visual effect)
void AreaVisualEffectForPC(object oPC, int nVFX, vector vPosition); |
Any way this one could be made to apply to a target object for a duration? For example like a light vfx that "sticks" to a creature for 30 seconds.
This part is really important: (Only specified PC will see visual effect)
The particular use i have in mind is nightvision goggles. |
|
Back to top |
|
|
acaos
Joined: 08 May 2007 Posts: 153
|
Posted: Tue Jun 23, 2009 5:01 Post subject: |
|
|
These look very nice. Do you have any objection to me integrating them into the main nwnx_funcs plugin?
I have a number of other unreleased ones as well I haven't had time to publicize, like BroadcastProjectileToObject.
Quixsilver: I have some functions as well which will do what you want, but they are some way from being released.
Acaos |
|
Back to top |
|
|
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Tue Jun 23, 2009 11:13 Post subject: |
|
|
Quixsilver wrote: | [...]
Any way this one could be made to apply to a target object for a duration? For example like a light vfx that "sticks" to a creature for 30 seconds.
This part is really important: (Only specified PC will see visual effect)
The particular use i have in mind is nightvision goggles. | It is one from few things which I'm trying to do Looks little problematic, but trying.
acaos wrote: | These look very nice. Do you have any objection to me integrating them into the main nwnx_funcs plugin?
I have a number of other unreleased ones as well I haven't had time to publicize, like BroadcastProjectileToObject.
Quixsilver: I have some functions as well which will do what you want, but they are some way from being released.
Acaos | No objections, that would be nice, besides it's better when people have everything in one place |
|
Back to top |
|
|
entropy
Joined: 23 Jun 2009 Posts: 6
|
Posted: Tue Jun 23, 2009 12:46 Post subject: |
|
|
Wow! Those all sounds utterly great :D
Amazing how you managed to find those really cool functions for the linux servers! I have just one question... how can I figure out where the hooks for those functions are in the windows version? Is there a trick to it, or is it really just time spent studying the code? |
|
Back to top |
|
|
scarface
Joined: 12 Jun 2005 Posts: 94 Location: Sweden
|
Posted: Mon Jun 29, 2009 19:05 Post subject: |
|
|
Very nice functions.
Is there any way to create a function like your AreaVisualEffectForPC() but for sound effects and/or music? |
|
Back to top |
|
|
brilhasti
Joined: 04 Jun 2008 Posts: 8
|
Posted: Thu Jul 02, 2009 19:54 Post subject: |
|
|
I love the idea of subjective visual effects... I'm getting ideas
Is it difficult to port this to Windows? |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Tue Jul 07, 2009 10:28 Post subject: Detect Evil Etc |
|
|
Im getting ideas of Detect Evil, or Detect Good sort of spells from Baldurs Gate 2.
Eg - Evil Characters get a visual Cue above them, that only the caster can see. |
|
Back to top |
|
|
Zebranky
Joined: 04 Jun 2006 Posts: 415
|
Posted: Tue Jul 07, 2009 20:56 Post subject: |
|
|
brilhasti wrote: | I love the idea of subjective visual effects... I'm getting ideas
Is it difficult to port this to Windows? |
It's always difficult to port NWNX plugins
But, actually, having looked at the code... probably not! If everything works right (dangerous words) it shouldn't be a difficult port at all. _________________ 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 |
|
|
Quixsilver
Joined: 20 Jan 2009 Posts: 30
|
Posted: Sat Oct 03, 2009 20:42 Post subject: |
|
|
axs wrote: |
// Get current animation of oTarget
// Returned value isn't equal to nwscript constants, you need to check desired value for your own
int GetAnimation(object oTarget);
|
Would it be possible to get something like SetAnimation(object oTarget, int nAnimation) that could accept the same animation values that are returned by your GetAnimation function in order to play any animation in the engine?
The bioware PlayAnimation/ActionPlayAnimation functions seems to be very limited in regards to the range of animations they will play. |
|
Back to top |
|
|
|