View previous topic :: View next topic |
Author |
Message |
xorbaxian
Joined: 18 Dec 2007 Posts: 45
|
Posted: Wed Nov 18, 2015 19:23 Post subject: nwnx_funcsext still under development ? |
|
|
hi,
i was looking forward to use some of the functions in nwnx_funcsext, they looked quite promising. so far, however, i've run into a few bugs. i was wondering if any development is being done on this plugin, or if it was more of an experimental thing that someone was playing around with.
bugs i've found follow.
________________
GetAnimation(...)
this function returns seemingly random results. or at least results that don't seem to correspond in any meaningful way to the animations a character is currently running. certainly they don't have any relationship to the ANIMATION_* constants in nwscript.nss.
void StartTimingBar(object oCreature, int nSeconds, string sScript)
well, it does start a timing bar, but there seem to be some strange timing issues because sometimes the sScript attached to it fires correctly and sometimes it doesn't.
CreateAreaTransitionOnLocation(...)
this function does create a transition object, but the transition is invalid. my goal was to create transitions around waypoints. here is the script i used to test :
Code: | void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC) && !GetIsDM(oPC))
return;
object oWP = GetObjectByTag("X13411"); // waypoint around which trans will be built
if (oWP == OBJECT_INVALID) {
SendMessageToPC(oPC, "*** NO TRANS-SPAWN WAYPOINT DEFINED");
return;
}
location lWP = GetLocation(oWP);
string sTag = GetTag(oWP);
string sTarg = GetName(oWP); // target of trans stored in wp name
if (sTarg == "" || sTag == "") {
SendMessageToPC(oPC, "*** TRANS TARGET NOT DEFINED");
return;
}
SendMessageToPC(oPC, "found source waypoint " + sTag + " at location " + LocationToString(lWP));
object oTarg = GetObjectByTag(sTarg);
if (oTarg == OBJECT_INVALID) {
SendMessageToPC(oPC, "*** TARGET WAYPOINT DOES NOT EXIST");
return;
}
SendMessageToPC(oPC, "found target waypoint " + GetTag(oTarg) + " at location " + LocationToString(GetLocation(oTarg)));
SendMessageToPC(oPC, "creating transition to waypoint " + sTarg);
object oTrans = CreateAreaTransitionOnLocation(lWP, AREA_TRANSITION_LINK_WAYPOINT, sTarg, 2.0f, "X_" + sTag);
if (oTrans == OBJECT_INVALID) {
SendMessageToPC(oPC, "*** CAN'T CREATE TRANSITION");
return;
}
SendMessageToPC(oPC, "created transition to " + sTarg + " with sTag X_" + sTag);
object oTarget = GetTransitionTarget(oTrans);
if (oTarget != OBJECT_INVALID) {
SendMessageToPC(oPC, "transition points to " + GetName(oTarget) + ", sTag = " + GetTag(oTarget));
return;
}
SendMessageToPC(oPC, "*** TRANSITION INVALID");
} |
the output i get is :
Code: | found source waypoint X13411 at location (X1342) ( 24.883064270, 35.435794830, -0.000005222) ( 270.000030518)
found target waypoint module_start at location (test) ( 44.488796234, 35.200099945, -0.000003815) ( 90.000000000)
creating transition to waypoint module_start
created transition to module_start with sTag X_X13411
*** TRANSITION INVALID |
|
|
Back to top |
|
|
xorbaxian
Joined: 18 Dec 2007 Posts: 45
|
Posted: Mon Nov 23, 2015 5:42 Post subject: |
|
|
i've fixed at least one of the bugs in the CreateAreaTransitionOnLocation() function. the author made a mistake in the .nss portion of the routine, it was calling the plugin with a constant rather than the supplied variable. there is also an error in the constants at the beginning of the file.
i'd like to contribute this file w/the fixes, is there a specific way i can/should do that ? |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Fri Nov 27, 2015 15:18 Post subject: |
|
|
xorbaxian wrote: | i've fixed at least one of the bugs in the CreateAreaTransitionOnLocation() function. the author made a mistake in the .nss portion of the routine, it was calling the plugin with a constant rather than the supplied variable. there is also an error in the constants at the beginning of the file.
i'd like to contribute this file w/the fixes, is there a specific way i can/should do that ? | Sure, just submit a pull request on Github. _________________ In Soviet Russia, NWN plays you! |
|
Back to top |
|
|
xorbaxian
Joined: 18 Dec 2007 Posts: 45
|
Posted: Fri Dec 04, 2015 2:38 Post subject: |
|
|
ok i went to push this up, but apparently i don't have access. i was pushing to github.com/NWNX/nwnx2-linux.git -- is that correct ? |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Fri Dec 04, 2015 19:09 Post subject: |
|
|
Fork the repository, push to a new branch (not master) in your forked repo and then Github will ask if you'd like to open a pull request to submit the changes in your branch to the main repo. _________________ In Soviet Russia, NWN plays you! |
|
Back to top |
|
|
xorbaxian
Joined: 18 Dec 2007 Posts: 45
|
Posted: Fri Dec 04, 2015 19:52 Post subject: |
|
|
thanks !
done. |
|
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
|