Onperceived

Moderator: Event DM

Post Reply
User avatar
_Wake_
Scholar of Fools
Posts: 435
Joined: Thu Sep 11, 2003 2:21 am
Location: Seattle, Wa.(GMT-7)

Onperceived

Post by _Wake_ » Sat Jul 10, 2004 3:34 am

How often does this fire ?
User avatar
Jordicus
Team Member; Retired with Honors
Posts: 8042
Joined: Tue Jan 21, 2003 3:46 pm
Location: Whitehall, PA (GMT -4)
Contact:

Post by Jordicus » Sat Jul 10, 2004 3:34 am

OnPerceived..

:wink:
You see things and you say, "Why?" But I dream things that never were and say, "Why not?" George Bernard Shaw
User avatar
_Wake_
Scholar of Fools
Posts: 435
Joined: Thu Sep 11, 2003 2:21 am
Location: Seattle, Wa.(GMT-7)

Post by _Wake_ » Sat Jul 10, 2004 3:35 am

:lol: yeah how often once per :?: :lol:

*edit*better yet does it fire per every oPC of a group or just for the leader of a group ?
:D
Last edited by _Wake_ on Sat Jul 10, 2004 3:39 am, edited 1 time in total.
User avatar
Jordicus
Team Member; Retired with Honors
Posts: 8042
Joined: Tue Jan 21, 2003 3:46 pm
Location: Whitehall, PA (GMT -4)
Contact:

Post by Jordicus » Sat Jul 10, 2004 3:38 am

heh..
The script attached to this event will fire whenever another creature perceives another creature or PC. Common uses of this script include having the creature yell a battle cry, greet the PC, or run away
You see things and you say, "Why?" But I dream things that never were and say, "Why not?" George Bernard Shaw
User avatar
_Wake_
Scholar of Fools
Posts: 435
Joined: Thu Sep 11, 2003 2:21 am
Location: Seattle, Wa.(GMT-7)

Post by _Wake_ » Sat Jul 10, 2004 3:40 am

sorry adjusted my question :oops:
User avatar
Jordicus
Team Member; Retired with Honors
Posts: 8042
Joined: Tue Jan 21, 2003 3:46 pm
Location: Whitehall, PA (GMT -4)
Contact:

Post by Jordicus » Sat Jul 10, 2004 3:43 am

my guess would be every PC
You see things and you say, "Why?" But I dream things that never were and say, "Why not?" George Bernard Shaw
User avatar
_Wake_
Scholar of Fools
Posts: 435
Joined: Thu Sep 11, 2003 2:21 am
Location: Seattle, Wa.(GMT-7)

Post by _Wake_ » Sat Jul 10, 2004 3:46 am

The reson I ask is this old script I made for a SP mod, And was thinking of PW scripting and how onperceived worked along these lines of checking one oPC or if grouped if it checked all members for Item.

//::///////////////////////////////////////////////////////////
//:: Created By: _Wake_
//:: Created On: April/3/2003
//::///////////////////////////////////////////////////////////
#include "NW_I0_GENERIC"
object oSeen = GetLastPerceived();
// oSeen sets the oPC as last seen by oNPC
object oRing = GetItemPossessedBy(oSeen, "StinkyMeat");
// checks to see if item
//(oSeen, "ITEM_TAG_HERE")
// is possessed by oPC
void main()
{
if (GetIsPC(oSeen))
// checks to see if oSeen is a oPC
{
if (oRing == OBJECT_INVALID)
// then sets up what happens if oPC
// didn't have the item
{
SetIsTemporaryEnemy(oSeen);
ActionSpeakString("What?s that smell, Intruder!");
ActionAttack(oSeen);
DetermineCombatRound(oSeen);
}
// and now else determines what happens
// if item was in oPC possession
else
{
SetIsTemporaryFriend(oSeen);
// here is how I fixed the snag if you set oSeen
// as temporarily friendly the check balances
// out if you were to lose the item then regain
// the item oNPC would have to do another
// perception thus now seeing the PC as friendly w0o0t :)
ActionPlayAnimation(ANIMATION_FIREFORGET_GREETING);
ActionSpeakString("Me get?en hungry.");
}
}
}
User avatar
Jeff
Knight of Useless Drivel
Posts: 66
Joined: Thu Oct 31, 2002 4:21 am
Location: http://www.legendofvalinor.com
Contact:

Post by Jeff » Mon Jul 12, 2004 2:14 pm

Just as an fyi....
The last few versions of NWNX have included a profiler plug-in that would be perfect for this.

I will tell you how often a script fires, and how long it takes to run.
User avatar
_Wake_
Scholar of Fools
Posts: 435
Joined: Thu Sep 11, 2003 2:21 am
Location: Seattle, Wa.(GMT-7)

Post by _Wake_ » Tue Jul 13, 2004 2:09 am

Thank you :)
Post Reply