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
Problem With Unlock Level Door
narutohokager Offline
Member

Posts: 149
Threads: 28
Joined: Jan 2011
Reputation: 0
#1
Problem With Unlock Level Door

Hi.
I have a big problem which I can not find a solution ... So here is the script :
Quote:void UnlockNextLevel(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("NextLevel", false, true);
PlaySoundAtEntity("", "unlock_door", "NextLevel", 0, false);
RemoveItem("SecondLevel");
}
void OnStart()
{
AddUseItemCallback("", "SecondLevel", "NextLevel", "UnlockNextLevel", true);
}
The Key : http://img15.hostingpics.net/pics/131812481.png
The Door : http://img15.hostingpics.net/pics/468589242.png
What wrong ???? I really look everywhere...

Help needed Sad

Sorry for my bad english
Amnesia The Revenge - Chapter 1
12-04-2011, 08:59 PM
Website Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#2
RE: Problem With Unlock Level Door

there is a different function for level doors.
void OnStart()
{
AddUseItemCallback("", "SecondLevel", "NextLevel", "UnlockNextLevel", true);
}
void UnlockNextLevel(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("NextLevel", false);
PlaySoundAtEntity("", "unlock_door", "NextLevel", 0, false);
RemoveItem("SecondLevel");
}
your script was also out of place for some reason. void OnStart() is always at the top.



Ba-da bing, ba-da boom.
12-04-2011, 09:07 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#3
RE: Problem With Unlock Level Door

(12-04-2011, 09:07 PM)JenniferOrange Wrote: your script was also out of place for some reason. void OnStart() is always at the top.

It doesn't have to be, since the compiler compiles the entire script to bytecode before making use of it.

Tutorials: From Noob to Pro
12-05-2011, 12:47 AM
Website Find
narutohokager Offline
Member

Posts: 149
Threads: 28
Joined: Jan 2011
Reputation: 0
#4
RE: Problem With Unlock Level Door

Thank you it work Smile
But when the door is locked, I put a SetEntityInteractCallback, is that after using the key you can remove it?


Sorry for my bad english
Amnesia The Revenge - Chapter 1
12-05-2011, 10:57 AM
Website Find




Users browsing this thread: 2 Guest(s)