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:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spawn monsters
tokugawa1 Offline
Junior Member

Posts: 37
Threads: 8
Joined: Aug 2012
Reputation: 0
#1
Spawn monsters

Well i want to spawn these monsters but not at the same time. they spawn at the same time with this script and also the game crashes so here it is

void OnStart()
{
AddUseItemCallback("", "key_tomb_1", "mansion_1", "UsedKeyOnDoor", true);
SetEntityPlayerInteractCallback("key_tomb_1", "Spawn_Monster", true);
AddUseItemCallback("", "key_torture_chamber_1", "mansion_4", "UsedKeyOnDoor", true);
SetEntityPlayerInteractCallback("key_torture_chamber_1", "Spawn_Monster", true);
SetEntityPlayerInteractCallback("note_generic_3", "Spawn_Monster", true);
}


void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlayGuiSound("unlock_door", 0.8f);
RemoveItem("key_tomb_1");
SetSwingDoorLocked("mansion_4", false, true);
PlayGuiSound("unlock_door", 0.8f);
RemoveItem("key_torture_chamber_1");
}


void Spawn_Monster(string &in asEntity)

{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_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, "");
}
{
SetEntityActive("servant_brute_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 1, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_6", 0, "");
}
{
SetEntityActive("servant_brute_2", true);
SetEntityActive("servant_brute_3", true);
SetEntityActive("servant_brute_4", true);
SetEntityActive("servant_grunt_2", true);
SetEntityActive("servant_grunt_3", true);
}
08-04-2012, 08:26 PM
Find


Messages In This Thread
Spawn monsters - by tokugawa1 - 08-04-2012, 08:26 PM
RE: Spawn monsters - by Steve - 08-04-2012, 08:30 PM
RE: Spawn monsters - by tokugawa1 - 08-04-2012, 08:47 PM
RE: Spawn monsters - by Steve - 08-04-2012, 09:06 PM
RE: Spawn monsters - by tokugawa1 - 08-04-2012, 09:22 PM
RE: Spawn monsters - by tokugawa1 - 08-04-2012, 09:50 PM
RE: Spawn monsters - by Steve - 08-04-2012, 09:34 PM
RE: Spawn monsters - by Steve - 08-05-2012, 05:00 PM
RE: Spawn monsters - by tokugawa1 - 08-05-2012, 07:45 PM
RE: Spawn monsters - by Steve - 08-05-2012, 07:46 PM



Users browsing this thread: 2 Guest(s)