Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Level Doors and Text?
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#2
RE: Level Doors and Text?

I don't fully understand but what I think you want is this.
you want to have two doors one you open when you use a key on it and one to open when you pick up the lantern.
If I'm wrong my bad. but to do what I think you want to do you can use this:
FOR THE LEVEL DOOR
void OnStart()
{
AddUseItemCallback("", "Name_of_Key", "Name_of_Leveldoor", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("Name_of_Leveldoor", false);
PlaySoundAtEntity("", "unlock_door", "Name_of_Leveldoor", 0, false);
RemoveItem("Name_of_Key");
}
||||||Also make sure you have the leveldoorlocked!!!||||||
And use this for the lantern:
void OnStart()
{
SetEntityPlayerInteractCallback("Name_Of_Lantern", "OnLanternPickUp", true);
}
void OnLanternPickUp(string &in item)
{
SetLevelDoorLocked("Name_of_Leveldoor", false);
}
But if you want to make the door open/unlocked but you can't open it you could use:
SetEntityInteractionDisabled(string& asName, bool abDisabled);

on the door. so you can't click on it I hope this helped Big Grin

CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
07-16-2012, 09:41 AM
Find


Messages In This Thread
Level Doors and Text? - by SiderealStop - 07-16-2012, 06:52 AM
RE: Level Doors and Text? - by Steve - 07-16-2012, 09:41 AM



Users browsing this thread: 1 Guest(s)