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
Making Player Look at Multiple Targets
Dark88 Offline
Junior Member

Posts: 48
Threads: 6
Joined: Dec 2010
Reputation: 0
#1
Making Player Look at Multiple Targets

I tried searching the forums to see if this has been answered before but I couldn't find anything so here's my question.

I'm trying to write the script where a monster spawns behind the player after entering a hallway and he turns around and looks then after 1.5 seconds or so another one spawns down the hall and he looks at that one for 1.5 seconds or so before the player 'regains' control and is forced to run to the map exit at the opposite end of the hall. Unfortunately with the code I have now he just looks at the second monster.

void MonsterFunc (string &in asParent , string &in asChild , int alState)
{
    SetEntityActive("servant_brute_3", true);
    AddEnemyPatrolNode("servant_brute_3", "PathNodeArea_2", 0.0f, "");
    AddEnemyPatrolNode("servant_brute_3", "PathNodeArea_1", 0.0f, "");
    StartPlayerLookAt("servant_brute_3", 5, 5, "");
    AddTimer("donelook_4", 1.5f, "TimerDoneLookAt_1");
    SetEntityActive("servant_brute_2", true);
    AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_1", 0.0f, "");
    StartPlayerLookAt("servant_brute_2", 5, 5, "");
    AddTimer("donelook_5", 1.5f, "TimerDoneLookAt_1");
}

The TimerDoneLookAt_1 is just a simple StopPlayerLookAt().

This is my first time ever attempting my own mod for a game before. It's certainly very satisfying experience so far. If I can get this to work and after a few more additions and tweaks I was going to release a small WIP demo so to speak of just my first map once I got everything working to see what everyone thought about my first attempt at modding. In advance I would like to give my appreciation for any help in this matter.
12-02-2010, 04:39 AM
Find


Messages In This Thread
Making Player Look at Multiple Targets - by Dark88 - 12-02-2010, 04:39 AM



Users browsing this thread: 2 Guest(s)