The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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 - Force Player to Look in Direction
Rokotain Offline
Member

Posts: 54
Threads: 9
Joined: Jul 2011
Reputation: 0
#1
Script - Force Player to Look in Direction

Hello Forum People! Big Grin

I'm quite new to scripting and don't understand 100% of Frictional Games's Scripting Tutorial. Blush

What I have is a grunt spawning and I would like to have a script that forces the player to look at the grunt for a certain amount of time.

I read another thread where I found:
StartPlayerLookAt("Name?", 5.0f, 5.0f, "");
But I don't understand what it means, are "5.0f" coordinates? and the "Name?" is that the name of a Script Area Entity or an Object/Enemy Entity?

The place it would be is in this:
void LookAtGrunt(string &in asParent, string &in asChild, int alState)
{
    SetEntityActive("ghostgrunt", true);
    ShowEnemyPlayerPosition("ghostgrunt");
    AddTimer("", 2, "TimerGruntEnd");
        (>- Here -<)
}

Don't worry about the "LookAtGrunt" name in top, already got figured out how to activate that script.

So how would I get the player to look at the place the grunt is standing/spawns/area, we.

Also, I'm Norwegian so please excuse me if there are any typos. Angel

Thanks for reading!
Hope you have a solution! ^-^
Rokotain
(This post was last modified: 07-20-2011, 08:41 PM by Rokotain.)
07-20-2011, 08:40 PM
Find


Messages In This Thread
Script - Force Player to Look in Direction - by Rokotain - 07-20-2011, 08:40 PM



Users browsing this thread: 1 Guest(s)