Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

A tiny bit of help.

How would I toggle a players Stealth Mode to off if he fails his Hide Skill check. Sorry I rely heavily on Lilac Souls program. I Found the ToggleStealthMode Constant but I'm uncertain how to string it together. Help wanted Code Monkeys! ;)



object oTarget;
/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.3

For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */

//Put this script OnEnter
#include "nw_i0_tool"
void main()
{

object oPC = GetEnteringObject();

if (!GetIsPC(oPC)) return;

int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));

if (DoOnce==TRUE) return;

SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);

if (GetIsSkillSuccessful(oPC, SKILL_HIDE, 24))
{
RewardPartyXP(775, oPC, FALSE);

oTarget = GetObjectByTag("GAUTH_PROTECTOR");

AdjustReputation(oPC, oTarget, 100);

}
else
{

oTarget = GetObjectByTag("GAUTH_PROTECTOR");

AdjustReputation(oPC, oTarget, -100);

SetIsTemporaryEnemy(oPC, oTarget);

AssignCommand(oTarget, ActionAttack(oPC));



}


}

Comments

  • TerrorbleTerrorble Member Posts: 104
    #include "nw_i0_tool"
    void main()
    {
    
    object oPC = GetEnteringObject();
    
    if (!GetIsPC(oPC)) return;
    
    int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));
    
    if (DoOnce==TRUE) return;
    
    SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
    
    if (GetIsSkillSuccessful(oPC, SKILL_HIDE, 24))
    {
    RewardPartyXP(775, oPC, FALSE);
    
    oTarget = GetObjectByTag("GAUTH_PROTECTOR");
    
    AdjustReputation(oPC, oTarget, 100);
    
    }
    else
    {
    //ADD THIS HERE
    SetActionMode(oPC,ACTION_MODE_STEALTH,FALSE);
    
    
    oTarget = GetObjectByTag("GAUTH_PROTECTOR");
    
    AdjustReputation(oPC, oTarget, -100);
    
    SetIsTemporaryEnemy(oPC, oTarget);
    
    AssignCommand(oTarget, ActionAttack(oPC));
    
    
    
    }
    
    
    }
    

    dunahan
  • TerrorbleTerrorble Member Posts: 104
    Oops, posted that without comments but the needed line is added in just after your else-statement

    This turns off stealth mode:
    SetActionMode(oPC,ACTION_MODE_STEALTH,FALSE);

  • ZephiriusZephirius Member Posts: 100
    Thank you for your reply.

Sign In or Register to comment.