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
Same issue again; Activating a script area.
ApeCake Offline
Member

Posts: 116
Threads: 20
Joined: Jun 2012
Reputation: 4
#1
Same issue again; Activating a script area.

It seems simple, but for-the-love-of-god I just CAN'T get it to work. It's delaying my map and pisses me off. I just want a script area set to active when I pick up a rod. Here's my script.


void OnPickup(string &in asEntity, string &in type)
{
if(asEntity == "usekey")
{
StopPlayerLookAt();
}
else if(asEntity == "rod_2")
{
SetEntityActive("spawnmonster", true);
AddEntityCollideCallback("Player", "spawnmonster", "activatethegrunt", true, 1);
}
}

void activatethegrunt(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_4", true);
AddEnemyPatrolNode("servant_grunt_4", "PathNodeArea_13", 0.001, "");
AddEnemyPatrolNode("servant_grunt_4", "PathNodeArea_14", 0.001, "");
AddEnemyPatrolNode("servant_grunt_4", "PathNodeArea_15", 0.001, "");
AddEnemyPatrolNode("servant_grunt_4", "PathNodeArea_16", 0.001, "");
AddEnemyPatrolNode("servant_grunt_4", "PathNodeArea_17", 0.001, "");
}

The rod is called rod_2, the script area is called spawnmonster and is set inactive, the monster is called servant_grunt_4 and the pathnodes have the right name. And yes, the name of the map and the .hps are the same.
(This post was last modified: 07-04-2012, 02:20 PM by ApeCake.)
07-03-2012, 08:12 PM
Find


Messages In This Thread
Same issue again; Activating a script area. - by ApeCake - 07-03-2012, 08:12 PM



Users browsing this thread: 1 Guest(s)