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 not running!
MGermundsson Offline
Junior Member

Posts: 23
Threads: 3
Joined: Aug 2011
Reputation: 0
#1
Script not running!

Help!

I am trying to activate an enemy (+ patrolnodes), make the player look at him for 1 second, then be able to look freely but noticing boxes in your way that wasn't there before! I get no error, it simply doesn't do anything at all, i tried the .hps file to activate the enemy as soon as it started and the .hps works fine...but not the script! Please help!

void OnEnter()
{
    AddEntityCollideCallback("Player", "AreaChaseGrunt", "ActivateChaseGrunt", true, 1);
    AddEntityCollideCallback("servant_brute_1", "ScriptArea2", "Monsterdeactive", true, 1);
    SetEntityActive("ge_box_wood01_1", false);
    SetEntityActive("ge_box_wood01_2", false);
    SetEntityActive("ge_box_wood01_3", false);
    SetEntityActive("ge_box_wood01_4", false);
    SetEntityActive("ge_box_wood01_5", false);
    SetEntityActive("ge_box_wood01_6", false);
    SetEntityActive("ge_box_wood01_7", false);
    SetEntityActive("ge_box_wood01_8", false);
}

void ActivateChaseGrunt(string &in asParent, string &in asChild, int alState)
{
    SetEntityActive("servant_brute_1", true);
    AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 1, "");
    AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 1, "");
    AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 1, "");
    AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 1, "");
    AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 1, "");
    AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_6", 1, "");
    StartPlayerLookAt("servant_brute_1", 10.0f, 10.0f, "");
    AddTimer("StopStare", 1, "StopPlayerLookAt");
}

void StopPlayerLookAt(string &in asTimer)
{
    StopPlayerLookAt();
    SetEntityActive("ge_box_wood01_1", true);
    SetEntityActive("ge_box_wood01_2", true);
    SetEntityActive("ge_box_wood01_3", true);
    SetEntityActive("ge_box_wood01_4", true);
    SetEntityActive("ge_box_wood01_5", true);
    SetEntityActive("ge_box_wood01_6", true);
    SetEntityActive("ge_box_wood01_7", true);
    SetEntityActive("ge_box_wood01_8", true);
}

void Monsterdeactive(string &in asParent, string &in asChild, int alState)
{
    SetEntityActive("servant_brute_1", false);
}

void OnLeave()
{

}

I can't see any bugs in the code...so please help me, i have done everything i could think of!!![/font]
(This post was last modified: 08-26-2011, 10:06 PM by MGermundsson.)
08-26-2011, 07:00 PM
Find


Messages In This Thread
Script not running! - by MGermundsson - 08-26-2011, 07:00 PM
RE: Script not running! - by Kyle - 08-26-2011, 07:24 PM
RE: Script not running! - by MGermundsson - 08-26-2011, 07:31 PM
RE: Script not running! - by Kyle - 08-26-2011, 08:00 PM
RE: Script not running! - by Elven - 08-26-2011, 08:04 PM
RE: Script not running! - by MGermundsson - 08-26-2011, 08:22 PM
RE: Script not running! - by Kyle - 08-26-2011, 09:32 PM
RE: Script not running! - by MGermundsson - 08-26-2011, 10:04 PM



Users browsing this thread: 1 Guest(s)