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
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#2
RE: Help

Ok, here you go.


void OnStart()
{
AddUseItemCallback("", "BasementDoorKey", "BasementDoor", "UsedKeyOnDoor", true);//THIS IS A CALLBACK COMMAND
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)//THIS IS THE SYNTAX
{
SetSwingDoorClosed("ScareDoor", true, true);//THIS IS THE FUNCTION
}


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

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
(This post was last modified: 01-23-2012, 02:58 AM by Tripication.)
01-23-2012, 02:46 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)