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.
Reseting Secret doors and Objects trigger?
Débuté par
Skunkeen
, août 15 2010 06:12
#1
Posté 15 août 2010 - 06:12
#2
Posté 15 août 2010 - 06:30
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
Posté 15 août 2010 - 07:07
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.
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
Posté 16 août 2010 - 09:13
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.
//:://////////////////////////////////////////////////
//:: 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
Posté 16 août 2010 - 10:28
This is not actually what you asked for but well worth a look, it handles "all things secret" simply and efficiently. 
Killer Secret Objects
Killer Secret Objects
Modifié par Tyndrel, 16 août 2010 - 10:29 .





Retour en haut






