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
[Script] StartplayerLookAt won´t work
ooadrianoo Offline
Member

Posts: 82
Threads: 29
Joined: Apr 2012
Reputation: 0
#1
[Script] StartplayerLookAt won´t work

Here is my script:

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_17", "script1", true, 1);
}

void script1(string &in asParent, string &in asChild, int alState)

{
SetPlayerActive(false);
StartPlayerLookAt("bust_1", 6.0, 6.0, "");
AddTimer("", 10.0f, "Timer_21");
}

void Timer_21(string&in asTimer)
{
StopPlayerLookAt();
SetPlayerActive(true);}
I don`t know why StartplayerlookAt doesn´t work. SetPlayerActive works.
(This post was last modified: 07-10-2012, 09:24 PM by ooadrianoo.)
07-10-2012, 09:22 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#2
RE: [Script] StartplayerLookAt won´t work

Check so the entity has the right name

07-10-2012, 09:28 PM
Find
ooadrianoo Offline
Member

Posts: 82
Threads: 29
Joined: Apr 2012
Reputation: 0
#3
RE: [Script] StartplayerLookAt won´t work

Checked: It is the right name Confused

Any other ideas?
(This post was last modified: 07-10-2012, 09:35 PM by ooadrianoo.)
07-10-2012, 09:29 PM
Find
JMFStorm Offline
Member

Posts: 205
Threads: 8
Joined: Aug 2011
Reputation: 28
#4
RE: [Script] StartplayerLookAt won´t work

Put
"StartPlayerLookAt("bust_1", 6.0f, 6.0f, "");"
or
"StartPlayerLookAt("bust_1", 6, 6, "");"
instead.

And also, 6 is pretty f*king high number. Could use 2-3 if you don't want it to look completely retarted.

(This post was last modified: 07-10-2012, 09:38 PM by JMFStorm.)
07-10-2012, 09:36 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#5
RE: [Script] StartplayerLookAt won´t work

Oh yea I forgot about that, as JMFStorm says either put f behind the 6.0 or just write 6 that's because everytime you write with a decimal it needs a f since it's a float but if you write without decimals you don't need the f since then it's a integer.

07-10-2012, 09:42 PM
Find
ooadrianoo Offline
Member

Posts: 82
Threads: 29
Joined: Apr 2012
Reputation: 0
#6
RE: [Script] StartplayerLookAt won´t work

I tried all what you said and still remains the same.
/SilentStriker: Can you give me an example?
07-10-2012, 09:49 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#7
RE: [Script] StartplayerLookAt won´t work

What entity represents "bust_1"?

Tutorials: From Noob to Pro
07-10-2012, 09:49 PM
Website Find
ooadrianoo Offline
Member

Posts: 82
Threads: 29
Joined: Apr 2012
Reputation: 0
#8
RE: [Script] StartplayerLookAt won´t work

a head of a statue
07-10-2012, 09:50 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#9
RE: [Script] StartplayerLookAt won´t work

(07-10-2012, 09:49 PM)ooadrianoo Wrote: I tried all what you said and still remains the same.
/SilentStriker: Can you give me an example?
hmm...

So a float looks like this 6.0f and a integer looks like this 6

Here's a video that YourComputer made: http://www.youtube.com/watch?v=hrkpC5N_pZM&feature=plcp

07-10-2012, 09:54 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#10
RE: [Script] StartplayerLookAt won´t work

The bust statue is a StaticProp entity. StartPlayerLookAt does not relate to StaticProp entities. You'll have to edit the entity in the model editor and change its type to Object::Static or use a different statue that isn't a StaticProp entity.

Tutorials: From Noob to Pro
07-10-2012, 10:04 PM
Website Find




Users browsing this thread: 2 Guest(s)