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
Request Amnesia Custom Story Key problems.
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#3
RE: Amnesia Custom Story Key problems.

PHP Code: (Select All)
void OnLeave()
{
 
AddEntityCollideCallback("Player""QuestArea6""MyRoom"true1);
 
AddEntityCollideCallback("Player""QuestArea7""MyRoom2"true1);
 
AddEntityCollideCallback("Player""QuestArea8""MyRoom3"true1);
 
AddEntityCollideCallback("Player""SlimeFear""Slimee"true1);
 
AddUseItemCallback("""key_study_1""leveldoor_3""UnlockLevelDoor"true);
}

void UnlockLevelDoor(string &in asEntitystring &in asItem)
{
  
AddPlayerSanity(10.0f);
  
SetLevelDoorLocked("leveldoor_3"false);
  
PlaySoundAtEntity("""unlock_door.snt""leveldoor_3"0false);
  
RemoveItem("key_study_1");
  
CompleteQuest("searchquest2","SearchQuest2");


First, you used the wrong callback on the wrong function. UnlockLevelDoor is a callback of AddUsItemCallback. Then why is it using the AddEntityCollideCallback callback syntax?

Second, SetLevelDoorLocked has the wrong argument. Your argument (string, bool, bool) is actually for SetSwingDoorLocked. SetLevelDoorLocked has only two arguments (string, bool).

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 08-17-2014, 01:20 AM by PutraenusAlivius.)
08-17-2014, 01:19 AM
Find


Messages In This Thread
Amnesia Custom Story Key problems. - by Catalyst - 08-16-2014, 12:56 PM
RE: Amnesia Custom Story Key problems. - by PutraenusAlivius - 08-17-2014, 01:19 AM



Users browsing this thread: 1 Guest(s)