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
[SOLVED]Collide doesn't work (I must be blind)
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#1
[SOLVED]Collide doesn't work (I must be blind)

This function won't call.
No errors. No alerts.

What should happen is easy:
Door collides with area -> Monster gets active -> Monster follows pathnode -> Monster disappear

Script:

void OnStart()
{
AddEntityCollideCallback("castle_arched01_1", "AreaOpenDoorGrunt", "OpenDoorGrunt", true, 0);

AddEntityCollideCallback("servant_grunt_3", "AreaMonsterDisappear_1", "MonsterDisappear_1", true, 0);

}


void OpenDoorGrunt(string &in asParent, string &in asChild, int alState)
{

AddDebugMessage("CALLING SCRIPT", false);

if(GetLocalVarInt("MonsterIsActive") == 1)
{
return;
}

if(GetLocalVarInt("StopMonster") == 1)
{
return;
}
AddDebugMessage("MONSTER ACTIVE", false);
SetEntityActive("servant_grunt_3", true);
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_100", 0, "");
SetLocalVarInt("MonsterIsActive", 1);
SetEntityActive("AreaOpenDoorGrunt", false);
}


void MonsterDisappear_1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_3", false);
PlaySoundAtEntity("", "Enabled.snt", "AreaStopMonster", 0, false);
}

None of the 2 debug messages get called. What am I missing?

Trying is the first step to success.
(This post was last modified: 09-01-2012, 10:06 AM by FlawlessHappiness.)
08-29-2012, 06:55 PM
Find


Messages In This Thread
[SOLVED]Collide doesn't work (I must be blind) - by FlawlessHappiness - 08-29-2012, 06:55 PM



Users browsing this thread: 1 Guest(s)