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
Make player look at entity?
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#12
RE: Make player look at entity?

////////////////////////////
// Run when the map starts
void OnStart()
{
AddUseItemCallback("", "And", "Locked", "KeyOnDoor", true);
SetEntityCallbackFunc("And", "OnPickup");
SetEntityCallbackFunc("Antidote", "OnPickup2");
SetEntityPlayerInteractCallback("Antidote", "Win", true);
AddEntityCollideCallback("Player", "Message_1", "Message1", true, 1);
AddEntityCollideCallback("Player", "End", "Message2", true, 1);
}


void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup1", 0);
}
void Message2(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup2", 0);
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("grunt_1", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Locked", false, true);
PlaySoundAtEntity("", "explosion_rock_large.snt", "Locked", 0, false);
RemoveItem("And");
}
void OnPickup2(string &in asEntity, string &in type)
{
SetEntityActive("Master", true);
}
void Win(string &in asEntity)
{
StartPlayerLookAt("Master", 3, 5, "");
AddTimer("", 1, "Message_func");
}
void Message_func(string &in asTimer)
{
SetMessage("Messages", "Popup3", 2);
AddTimer("", 2, "CreditStart");
}
void CreditStart(string &in asTimer)
{
StartCredits("ending_daniel.ogg", true, , "Ending", 1);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}

02-03-2012, 07:16 PM
Find


Messages In This Thread
Make player look at entity? - by Datguy5 - 02-01-2012, 07:53 PM
RE: Make player look at entity? - by Datguy5 - 02-01-2012, 08:10 PM
RE: Make player look at entity? - by FinBanana - 02-01-2012, 09:29 PM
RE: Make player look at entity? - by Datguy5 - 02-02-2012, 03:01 PM
RE: Make player look at entity? - by Datguy5 - 02-02-2012, 05:51 PM
RE: Make player look at entity? - by Datguy5 - 02-03-2012, 06:01 PM
RE: Make player look at entity? - by Inurias - 02-03-2012, 06:12 PM
RE: Make player look at entity? - by Datguy5 - 02-03-2012, 06:59 PM
RE: Make player look at entity? - by Inurias - 02-03-2012, 07:05 PM
RE: Make player look at entity? - by Datguy5 - 02-03-2012, 07:16 PM
RE: Make player look at entity? - by Inurias - 02-03-2012, 07:30 PM
RE: Make player look at entity? - by Datguy5 - 02-03-2012, 07:50 PM
RE: Make player look at entity? - by Inurias - 02-03-2012, 08:16 PM
RE: Make player look at entity? - by Datguy5 - 02-03-2012, 10:08 PM



Users browsing this thread: 1 Guest(s)