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
2 keys script
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#6
RE: 2 keys script

(03-10-2012, 12:14 PM)Stepper321 Wrote:
Quote:////////////////////////////
// Run first time starting map
void OnStart()
{

}

////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "key1", "door1", "KeyOnDoor", true);
AddUseItemCallback("", "key2", "door2", "KeyOnDoor2", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door1", false, true);
PlaySoundAtEntity("", "unlock_door", "door1", 0, false);
RemoveItem("key1");
}

void KeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door2", false, true);
PlaySoundAtEntity("", "unlock_door", "door2", 0, false);
RemoveItem("key2");
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
No it's this one.
Correction: Both work.


(03-10-2012, 12:43 PM)Stepper321 Wrote: You are doing much wrong, you can't do a void in the callbacks, and there must be an } after any callbacks.
not after you did it all, i can't fix this sorry, its too messed for me Sad
Those are not callbacks.

(This post was last modified: 03-10-2012, 12:49 PM by flamez3.)
03-10-2012, 12:47 PM
Find


Messages In This Thread
2 keys script - by FlawlessHappiness - 03-10-2012, 11:32 AM
RE: 2 keys script - by flamez3 - 03-10-2012, 11:45 AM
RE: 2 keys script - by Stepper321 - 03-10-2012, 12:14 PM
RE: 2 keys script - by flamez3 - 03-10-2012, 12:47 PM
RE: 2 keys script - by FlawlessHappiness - 03-10-2012, 12:29 PM
RE: 2 keys script - by Stepper321 - 03-10-2012, 12:43 PM
RE: 2 keys script - by FlawlessHappiness - 03-10-2012, 01:08 PM
RE: 2 keys script - by flamez3 - 03-10-2012, 01:33 PM
RE: 2 keys script - by FlawlessHappiness - 03-10-2012, 02:55 PM
RE: 2 keys script - by flamez3 - 03-10-2012, 03:01 PM
RE: 2 keys script - by FlawlessHappiness - 03-10-2012, 03:23 PM
RE: 2 keys script - by DaAinGame - 03-10-2012, 08:28 PM



Users browsing this thread: 1 Guest(s)