I want to unlock a door by scripting.
I have an area door that I set the initial state to lock and the pick lock level to impossible. and I want when the player recieve the quest from the npc (who is in the same area) the door come unlock. I try this code, but it doesn't work:
#include "events_h"
#include "plt_quest_armure"
#include "wrappers_h"
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
switch(nEventType)
{
case EVENT_TYPE_SET_PLOT:
{
int iprog=WR_GetPlotFlag(PLT_QUEST_ARMURE, TUER_LES_MONSTRE_SOUS_LA_CHANTRIE, TRUE);
object odoor=GetObjectByTag("door_sanctuaire_ch");
if(iprog== TRUE)
{
SetPlaceableState(odoor, PLC_STATE_DOOR_UNLOCKED);
}
// Insert event-handling code here.
break;
}
}
HandleEvent(ev, RESOURCE_SCRIPT_AREA_CORE);
}
is someone can help me?
Modifié par slaaleth, 12 janvier 2010 - 09:29 .





Retour en haut






