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
Force Player lookat coding help
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Force Player lookat coding help

(01-24-2013, 11:40 AM)Cyphermur9t Wrote: void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "ScriptArea_1", true, 1);
AddTimer("", 3, "stoplook");
}

//////////////////////////////////////////

void ScriptArea_1(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("Look1", 5.0f, 5.0f, "");
}

void stoplook(string &in asTimer)
{
StopPlayerLookAt();
}

I think it would be better this way:

[code]void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "FUNCTION", true, 1);
}

//////////////////////////////////////////

void FUNCTION(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("Look1", 5.0f, 5.0f, ""); //Look1 is the area you look at
AddTimer("", 3, "stoplook");
}

void stoplook(string &in asTimer)
{
StopPlayerLookAt();
}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
01-24-2013, 02:17 PM
Find


Messages In This Thread
Force Player lookat coding help - by Cyphermur9t - 01-24-2013, 11:40 AM
RE: Force Player lookat coding help - by The chaser - 01-24-2013, 02:17 PM



Users browsing this thread: 1 Guest(s)