View previous topic :: View next topic |
Author |
Message |
Jantima
Joined: 11 Feb 2005 Posts: 6 Location: Italy
|
Posted: Fri Feb 11, 2005 10:00 Post subject: Wingtail_demo.mod [Wingery] |
|
|
I like this module and i've just changed it a bit to:
1) prevent a possible 'bug' in the OnUse script of the pillars that cause the player appearance to be stuck as will'o'wisp in case of lag/double click.
2) add persistence for the wings/tail.
Here, the changes i've made:
script: pillar_onuse
Code: |
#include "aps_include"
#include "bodypart_inc"
void main()
{
object oPC = GetLastUsedBy();
//this is to prevent the player from stuck as will_o_wisp if he double click on the pillar and/or due to lag
if (GetLocalInt(oPC, "InUse") == 1) return;
SetLocalInt(oPC,"InUse",1);
int nModP = GetLocalInt(OBJECT_SELF,"MODPART");
int nPart = nModP?NWNX_BODYPART_WING:NWNX_BODYPART_TAIL;
int nType = GetLocalInt(OBJECT_SELF,"MODTYPE");
SetBodyPart(oPC,nPart,nType);
FloatingTextStringOnCreature(
"Setting "+IntToString(nPart)+" to "+IntToString(nType),
oPC);
// Add Persistent wings//
if (nPart == 29)SetPersistentInt(oPC,"WingsModel",nType);
if (nPart == 28)SetPersistentInt(oPC,"TailModel",nType,);
// Need to sync the engine to the client otherwise effects
// stack. SetCreatureAppearanceType() can do this, but it
// must be a change and not application of their current type.
// Therefore we need a pair. A delay of about 1.0 second seems
// to be the safe minium between them.
// Hide SetCreatureAppearanceType() effects with a flashy effect.
// You can also do this with Cutscene Invisibility applied before
// the first SCAT();
int nApp = GetAppearanceType(oPC);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectVisualEffect(VFX_FNF_STRIKE_HOLY), oPC, 1.5);
SetCreatureAppearanceType(oPC,APPEARANCE_TYPE_WILL_O_WISP);
DelayCommand(1.0,SetCreatureAppearanceType(oPC,nApp));
DelayCommand(2.0,SetLocalInt(oPC,"InUse",0));
}
|
Then in Module Propriety on your OnClientEnter script add this [or make and call a function to do this]:
Code: |
// include this:
// #include "bodypart_inc"
//Persistant wings//
int nType = GetPersistentInt(oPC,"WingsModel"); //Check Wings
if (nType != 0)
{
int nPart = 29;
SetBodyPart(oPC,nPart,nType);
int nApp = GetAppearanceType(oPC);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectVisualEffect(VFX_FNF_STRIKE_HOLY), oPC, 1.5);
SetCreatureAppearanceType(oPC,APPEARANCE_TYPE_WILL_O_WISP);
DelayCommand(1.0,SetCreatureAppearanceType(oPC,nApp));
}
nType = GetPersistentInt(oPC,"TailModel"); //Check Tail
if (nType != 0)
{
int nPart = 28;
SetBodyPart(oPC,nPart,nType);
int nApp = GetAppearanceType(oPC);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectVisualEffect(VFX_FNF_STRIKE_HOLY), oPC, 1.5);
SetCreatureAppearanceType(oPC,APPEARANCE_TYPE_WILL_O_WISP);
DelayCommand(1.0,SetCreatureAppearanceType(oPC,nApp));
}
|
*edit* i've FIXED: changed the:
Get/SetLocalInt(OBJECT_SELF,"InUse",1);
to:
Get/SetLocalInt(oPC,"InUse",1);
because it happened that one player clicked one pillar and straightway another one, and yep, it was stuck as will'o'wisp eheh, we tried and we were 3 cool will'o'wisp ( a bit of lag is required to reproduce the bug i believe) _________________ Antiworld Arena
Last edited by Jantima on Sun May 22, 2005 23:15; edited 1 time in total |
|
Back to top |
|
|
69_Jeremy_69
Joined: 23 Feb 2005 Posts: 4
|
Posted: Wed Feb 23, 2005 1:25 Post subject: |
|
|
Interesting. But where do you get the include bodypart_inc? |
|
Back to top |
|
|
Jantima
Joined: 11 Feb 2005 Posts: 6 Location: Italy
|
Posted: Wed Feb 23, 2005 20:47 Post subject: |
|
|
Mmm... must be into the wingtail_demo.mod, that must be into the linnwnx2 [linnwnx2-2.5.3-rc1.tar.gz\linnwnx2\nwn\wingtail_demo.mod] - I dunno if or why there is not into the Windows version, but however i can guess it might work on windows too.
I was going to post some pics of it
In The wingery mod there are this pillars, 4 for tails [lizard, bone devil and no-tail] and 7 for the wings [demon, angel, bat, dragon, butterfly, bird, and no-wings] that OnUse have the script to do the effect and apply the wings/tail model. The system won't really modify the .bic file, so that's why i've used the OnClient enter event and the persistant thing to restore the wings/tail.
In the wingtail_demo.mod there is also another area, called : The Lab; with other functions to change Body Parts, like head chest or any other else But i've just tested it one time, and i've not really used so i've no changes or suggestions about it, but for sure just because i've not so much time, because The Lab is for sure as great as the Wingery is
So actually this bodypart_inc script work for every body part, and not only for wings . _________________ Antiworld Arena |
|
Back to top |
|
|
69_Jeremy_69
Joined: 23 Feb 2005 Posts: 4
|
Posted: Wed Jun 01, 2005 2:33 Post subject: |
|
|
Does anyone have a link to the mod. I don't have a linux box. |
|
Back to top |
|
|
Jantima
Joined: 11 Feb 2005 Posts: 6 Location: Italy
|
Posted: Sat Jun 11, 2005 12:00 Post subject: |
|
|
You can download the linnwnx2-2.5.3-rc1.tar.gz
on windows and extract the archive, then look into it, into the nwn folder, there is the wingtail_demo.mod which is indeed compatible with windows too. _________________ Antiworld Arena |
|
Back to top |
|
|
Vladiat0r
Joined: 17 Jun 2005 Posts: 25
|
Posted: Fri Jun 17, 2005 3:02 Post subject: |
|
|
Get/SetBodyPart of NWNXFunctions no longer work with 1.66 patch. Apparently they changed the internal data structures somehow... at least on Linux that we are using. |
|
Back to top |
|
|
chunkymonky
Joined: 20 Feb 2005 Posts: 31
|
Posted: Sat Jun 18, 2005 1:08 Post subject: |
|
|
i hear that there are some linux problems in the update. |
|
Back to top |
|
|
Vladiat0r
Joined: 17 Jun 2005 Posts: 25
|
Posted: Sat Jun 18, 2005 1:12 Post subject: |
|
|
chunkymonky wrote: | i hear that there are some linux problems in the update. | I what you are talking about are the compiler issues that were resolved by Bioware. We currently are running 1.66 on linux. |
|
Back to top |
|
|
chunkymonky
Joined: 20 Feb 2005 Posts: 31
|
Posted: Sat Jun 18, 2005 16:01 Post subject: |
|
|
yeah our server had some problems with some scripts immediately following upgrading to 1.66, it was a relatively simple fix, but I imagine there will be more problems discovered since bioware does not seem to admit that Linux people want to host servers too |
|
Back to top |
|
|
orth
Joined: 10 Apr 2005 Posts: 12
|
Posted: Tue Jun 21, 2005 20:33 Post subject: |
|
|
Vladiat0r wrote: | Get/SetBodyPart of NWNXFunctions no longer work with 1.66 patch. Apparently they changed the internal data structures somehow... at least on Linux that we are using. |
I'm experiencing the same messed up functionality for get/setbodypart on Windows 1.66. Are these functions working for anyone on 1.66? |
|
Back to top |
|
|
Jantima
Joined: 11 Feb 2005 Posts: 6 Location: Italy
|
|
Back to top |
|
|
|
|
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
|