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
Monster doesn't spawn when "Script" area has collided with player (on custom story)
ryuthebeardy Offline
Junior Member

Posts: 5
Threads: 1
Joined: Feb 2012
Reputation: 0
#1
Monster doesn't spawn when "Script" area has collided with player (on custom story)

Recently, I have decided to make a custom story however I am new to the whole "C++" coding. So i kinda need help on this code below.
void OnStart()
{
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_gsrunt_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
}
void OnEnter
{

}
void OnLeave
{

}
Here is what I have done (If my description is confusing, i have a image of the area of my level),

.jpg   wtf.jpg (Size: 218.03 KB / Downloads: 127)
I have placed a monster behind a door (he is inactive), and when the player crosses the door, he should collide with the "Script area" named "PlayerCollide", in which should active the monster, however doesn't... Can anyone help?
06-25-2012, 07:25 PM
Find


Messages In This Thread
Monster doesn't spawn when "Script" area has collided with player (on custom story) - by ryuthebeardy - 06-25-2012, 07:25 PM



Users browsing this thread: 1 Guest(s)