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
StartPlayerLookAt does not work
Lake Offline
Member

Posts: 58
Threads: 20
Joined: Jul 2012
Reputation: 0
#1
StartPlayerLookAt does not work

this is my script:

void OnStart()

{
AddEntityCollideCallback("Player", "ScriptArea_4", "capitoloz", true, 1);
}

void void capitoloz(string &in asParent, string &in asChild, int alState)
{
AddTimer("", 1, "capitolo0");
SetPlayerActive(false);
}

void capitolo0(string &in asTimer)
{
PreloadSound("impact_glass_high.snt");
StartPlayerLookAt("home", 1, 1, "capitolo01");
}

void capitolo01(string &in asParient, string &in asChild, int alState)
{
AddTimer("", 4.0f, "capitolo02");
StopPlayerLookAt();
}

When the player passes the area of script, the layer freezes, but does not look at the object in question, plus also the void capitolo01 does not work
08-06-2012, 06:50 PM
Find
Traggey Offline
is mildly amused

Posts: 3,257
Threads: 74
Joined: Feb 2012
Reputation: 185
#2
RE: StartPlayerLookAt does not work

This belongs in development support, make sure to post these kinds of questions there in the future.

Moved.
08-06-2012, 06:53 PM
Find
Lizard Offline
Member

Posts: 174
Threads: 23
Joined: Jul 2012
Reputation: 5
#3
RE: StartPlayerLookAt does not work

StartPlayerLookAt("home", 1, 1, "capitolo01");


what is home in the level editor?

CURRENT PROJECT:
A Fathers Secret == Just started
08-06-2012, 06:55 PM
Find
Lake Offline
Member

Posts: 58
Threads: 20
Joined: Jul 2012
Reputation: 0
#4
RE: StartPlayerLookAt does not work

(08-06-2012, 06:55 PM)ZereboO Wrote: StartPlayerLookAt("home", 1, 1, "capitolo01");


what is home in the level editor?
[Image: t9w9zt.jpg]

this
(This post was last modified: 08-06-2012, 07:00 PM by Lake.)
08-06-2012, 07:00 PM
Find
Lizard Offline
Member

Posts: 174
Threads: 23
Joined: Jul 2012
Reputation: 5
#5
RE: StartPlayerLookAt does not work

thats the problem.

I dont think you can use StartPlayerLookAt on a Zimmer hause

It only works with entites that the player can move in-game

CURRENT PROJECT:
A Fathers Secret == Just started
08-06-2012, 07:02 PM
Find
Lake Offline
Member

Posts: 58
Threads: 20
Joined: Jul 2012
Reputation: 0
#6
RE: StartPlayerLookAt does not work

I changed entity and now the player looks at him, but the void capitolo01 still does not work .... why?
08-06-2012, 07:11 PM
Find
Lizard Offline
Member

Posts: 174
Threads: 23
Joined: Jul 2012
Reputation: 5
#7
RE: StartPlayerLookAt does not work

I changed entity and now the player looks at him, but the void capitolo01 still does not work .... why?


Do you mean that the player wont stop looking?

CURRENT PROJECT:
A Fathers Secret == Just started
08-06-2012, 07:28 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#8
RE: StartPlayerLookAt does not work

(08-06-2012, 07:11 PM)Lake Wrote: I changed entity and now the player looks at him, but the void capitolo01 still does not work .... why?

Because you have the wrong callback syntax.

Tutorials: From Noob to Pro
08-06-2012, 07:29 PM
Website Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#9
RE: StartPlayerLookAt does not work

I've never made the look-callback work. I would add another timer and make that call capitolo01

Trying is the first step to success.
08-06-2012, 07:30 PM
Find
Lizard Offline
Member

Posts: 174
Threads: 23
Joined: Jul 2012
Reputation: 5
#10
RE: StartPlayerLookAt does not work

(08-06-2012, 07:11 PM)Lake Wrote: I changed entity and now the player looks at him, but the void capitolo01 still does not work .... why?
use this syntax

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

CURRENT PROJECT:
A Fathers Secret == Just started
08-06-2012, 07:32 PM
Find




Users browsing this thread: 2 Guest(s)