Aller au contenu

Photo

Reseting Secret doors and Objects trigger?


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
Skunkeen

Skunkeen
  • Members
  • 19 messages
I've read through 5 guides on this topic and find nothing on the Reset triggers. I assume you must enter some starting command _  then the tag name of the trigger.  please help with any tips please.

#2
Skunkeen

Skunkeen
  • Members
  • 19 messages
I found that adding x0_o2_sec_reset to OnUserDefined will reset but that is not the wanted effect in a MP setting. Really would like to know how to use the standard Secret Object  Reset Triggers and what they are for.

Modifié par Skunkeen, 15 août 2010 - 06:44 .


#3
Shadooow

Shadooow
  • Members
  • 4 469 messages
I have my own script for secret object that despawn the sectret object as soon the last player exits the trigger area.

I don't know if its possible to do in the standard system, but AFAIK it does use heartbeat so, replacement for the default secret objects is a good idea.

See this thread for more info.

#4
Sharona Curves

Sharona Curves
  • Members
  • 61 messages
This is my own script I use to reveal any secret item object from any trigger.
 
//:://////////////////////////////////////////////////
//:: X0_O2_SEC_xxxxxxx
//::    This is an OnEntered script for a generic trigger.
//::    When a PC enters the trigger area, it will perform
//::    a check to determine if the secret item is revealed,
//::    then make it appear if so.
//::
//::    Checking for: SKILL_SEARCH
//::
//:: Copyright © 2002 Floodgate Entertainment
//:: Created By: Naomi Novik
//:: Created On: 12/08/2002
//:://////////////////////////////////////////////////
//::  Modified By: Sharon Tipton
//::  June 06 2006
//::
//::
//::  Add RESREF String variable to trigger
//::  for Resref of object to be revealed by script
//::  Object appears once per party
//::  Can be safely used with x0_o2_sec_reset script
//:://////////////////////////////////////////////////

#include "x0_i0_secret"

void PartyRevealed(object oPC)
{
 object oParty = GetFirstFactionMember(oPC, TRUE);
         while(GetIsObjectValid(oParty) == TRUE)
         {
          object oArea = GetArea(OBJECT_SELF);
          object oLOC = GetArea(oParty);
          if(oArea == oLOC)
            {
            if(GetLocalInt(oParty, GetTag(OBJECT_SELF)) !=1)
            {
            SetLocalInt(oParty, GetTag(OBJECT_SELF), 1);
            RevealSecretItem(GetLocalString(OBJECT_SELF, "RESREF"));
             }
          oParty = GetNextFactionMember(oPC, TRUE);
          }
        oParty = GetNextFactionMember(oPC, TRUE);
        }
}


void main()
{
    object oEntered = GetEnteringObject();
    if(GetLocalInt(oEntered, GetTag(OBJECT_SELF)) == 1) return;
    if (GetIsSecretItemRevealed()) {return;}

    if ( DetectSecretItem(oEntered))
        {

            if (!GetIsPC(oEntered)) {
            // If a henchman, alert the PC if we make the detect check
            object oMaster = GetMaster(oEntered);
            if (GetIsObjectValid(oMaster)
                && oEntered == GetAssociate(ASSOCIATE_TYPE_HENCHMAN, oMaster))
            {
                AssignCommand(oEntered, PlayVoiceChat(VOICE_CHAT_SEARCH));
            }
        } else {
            // It's a PC, reveal the item
            AssignCommand(oEntered, PlayVoiceChat(VOICE_CHAT_LOOKHERE));
            PartyRevealed(oEntered);
        }
    }
    }

// -- END OF SCRIPT

Items or placeable objects not tagged as area specific(revealed via secrets, dropped by PCs, etc.) are destroyed via the OnExit Area Event when no further PCs are present in the area.

#5
Tyndrel

Tyndrel
  • Members
  • 185 messages
This is not actually what you asked for but well worth a look, it handles "all things secret" simply and efficiently.  :)

Killer Secret Objects

Modifié par Tyndrel, 16 août 2010 - 10:29 .