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
TheDanny942 Offline
Junior Member

Posts: 20
Threads: 7
Joined: Dec 2011
Reputation: 0
#3
RE: Help

(01-23-2012, 02:46 AM)Tripication Wrote: Ok, here you go.


void OnStart()
{
AddUseItemCallback("", "BasementDoorKey", "BasementDoor", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "Scary", "CollideScary", true, 1);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("BasementDoor", false, true);
PlaySoundAtEntity("", "unlock_door", "BasementDoor", 0, false);
RemoveItem("BasementDoorKey");
}

void CollideScary(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("ScareDoor", true, true);
}


When you create a CALLBACK, it means that your going to call it back later on. Seeing as you have no timers or any other slightly more complex Functions, all your callbacks(for now) will go in the void OnStart
Thanks a ton man! So whenever I create a new callback, I should put it with the others, below onstart?


01-23-2012, 02:54 AM
Find


Messages In This Thread
Help - by TheDanny942 - 01-23-2012, 02:41 AM
RE: Help - by Tripication - 01-23-2012, 02:46 AM
RE: Help - by TheDanny942 - 01-23-2012, 02:54 AM
RE: Help - by Tripication - 01-23-2012, 02:57 AM
RE: Help - by TheDanny942 - 01-23-2012, 03:07 AM
RE: Help - by Tripication - 01-23-2012, 03:31 AM



Users browsing this thread: 1 Guest(s)