Lightfoot8 wrote...
I hae decided that I do not like the trap option after testing. The reason is that there is no way to get rid of the "you triggered a trap' from floating over your head.
the best option seems to be to use the "OnDoorOpened' event. In my testing just telling the door to reclose it's self is enough to have the door never open.
I placed this in the Even and could not budge the door.
void main()
{
ActionCloseDoor(OBJECT_SELF);
}
So there is your answer. If they have the proper var do nothing. if they dont close the door.
SWEET!!!! Thats it.
To answer you questions above. No the door will not lose its trigger if the "oneshot" is unchecked on the trap tab. But since i never disarmed the traps in my test this may be ther reason i was still getting the trap feed back to the PC.
When you make a custom trap script and place it in the OnTrapTriggered event it take the place of the standerd trap setting scripts, so they will not fire in addition to the custom script.
As a second note. Since you are going to most likely be setting you doors to plot so that they can not be damaged. You could use your door stats instead of a local int on the door for who can open it. ( hardness/HP/fort save/reflex save/ willsave. for exsample
void main()
{
if (GetHardness()!= GetLocalInt(GetLastOpenedBy(),"DoorControl"))
{
ActionCloseDoor(OBJECT_SELF);
PlayVoiceChat(VOICE_CHAT_CUSS,GetLastOpenedBy());
}
}
I don't need that var on the door just the PC eg:
void main()
{
if (TRUE == GetLocalInt(GetLastOpenedBy(),"DoorControl"))
{
ActionCloseDoor(OBJECT_SELF);
PlayVoiceChat(VOICE_CHAT_CUSS,GetLastOpenedBy());
}
}
and then in my other area triggers (covering the floor in each room)
void main()
{
if ( pc_has_entered_a_new_room )
{
setLocalInt(oPC,"DoorControl", 0);
}else{
// do nothing
return;
}
// ...
/// do other stuff
// ...
}
Thanks !!
Modifié par Calgacus, 30 août 2010 - 01:51 .