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 
 
SetActionMode trouble with nwnx_events

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules
View previous topic :: View next topic  
Author Message
xardex



Joined: 02 Mar 2010
Posts: 40

PostPosted: Mon Jun 20, 2011 21:13    Post subject: SetActionMode trouble with nwnx_events Reply with quote

Code:
        case EVENT_STEALTH_MODE:
            {
                int iState = GetNWNXGetData( );
                int iTime = Time();
                int iLast = GetLocalInt(oPC, "stealth")+18;
                if ((iTime < iLast) && (iState == 1))  // too soon, dont stealth
                {
                    FloatingTextStringOnCreature(IntToString(iLast-iTime) + "s", oPC, FALSE);
                    SetActionMode(oPC, ACTION_MODE_STEALTH, 0);
                }
                else if ((iTime >= iLast) && (iState == 0)) // exited stealth, set time
                {
                    SetLocalInt(oPC, "stealth", iTime);
                }

            }
            break;


Basically this is a simple stealth timer.
Time() returns current server second..

The script runs exactly as it should, and nwnx_events runs flawlesly, but I cant for bleepops figure out why it refuses to set the stealth mode to 0 when it should.

Any help appreciated.
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Mon Jun 20, 2011 21:16    Post subject: Reply with quote

Try executing SetActionMode with a small delay.
_________________
In Soviet Russia, NWN plays you!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
xardex



Joined: 02 Mar 2010
Posts: 40

PostPosted: Mon Jun 20, 2011 21:55    Post subject: Reply with quote

Oh pff... Its always a simple thing.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules 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