xardex
Joined: 02 Mar 2010 Posts: 40
|
Posted: Mon Jun 20, 2011 21:13 Post subject: SetActionMode trouble with nwnx_events |
|
|
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. |
|