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
Help with a level that has more then two doors.
Jordo76 Offline
Member

Posts: 57
Threads: 7
Joined: Sep 2010
Reputation: 0
#7
RE: Help with a level that has more then two doors.

Revised the Script :
void OnStart()

{
AddUseItemCallback("", "key_study_1", "mansion_2", "UsedKeyOnDoor", true);
AddUseItemCallback("", "key_study_2", "mansion_3", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", "Player", 0, false);
RemoveItem(asItem);
}
Explication : You have not use asItem in RemoveItem,asEntity in SwingDoorLocked
For the 2nd script,all is wrong,you don't have to do more than one void UsedKeyOnDoor
And sometimes you put an { } without void before,crashing the game...
10-02-2010, 08:29 PM
Website Find


Messages In This Thread
RE: Help with a level that has more then two doors. - by Jordo76 - 10-02-2010, 08:29 PM



Users browsing this thread: 1 Guest(s)