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?
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#2
RE: Make player look at entity?

You use a
SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction);

then in the void you use

StartPlayerLookAt(string& asEntityName, float afSpeedMul, float afMaxSpeed, string& asAtTargetCallback);

and AddTimer
(string& asName, float afTime, string& asFunction);

then on the void from the timer you use
SetMessage(string& asTextCategory, string& asTextEntry, float afTime);

then maby another timer and then in the other timer void you use
StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum);


void OnStart()
{
SetEntityPlayerInteractCallback("NAMEOFENTITY", "NAMEOFCALLBACK", true);
}

void NAMEOFCALLBACK(string &in asEntity)
{
StartPlayerLookAt("NAMEOFWHATHESHOULDLOOKAT", 3, 5, "");
AddTimer("", 1, "Message_func")
}

void Message_func(string &in asTimer)
{
SetMessage("CATEGORY", "ENTRY", 2);
AddTimer("", 2, "CreditStart);
}

void CreditStart(string &in asTimer)
{
StartCredits("NAMEOFMUSIC.ogg", LOOP? true or false, string& asTextCat, string& asTextEntry, int alEndNum);
//Starts the end credits screen.    asMusic - the music to play (including .ogg)
  abLoopMusic - determines whether the music should loop
  asTextCat - the category to be used in the .lang file (must be “Ending”)
  asTextEntry - the entry in the .lang file (must be “MainCredits”)
  alEndNum - Amnesia has 3 different endings and displays a code  at the bottom. Determines which code is displayed. 0-2 will display  codes, any other integer will not.//
}

(This post was last modified: 02-01-2012, 08:09 PM by SilentStriker.)
02-01-2012, 08:03 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 SilentStriker - 02-01-2012, 08:03 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)