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
#5
RE: Spawn monsters

(08-04-2012, 09:06 PM)Steve Wrote: oh like that than just do this. Big Grin
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_two", true);
SetEntityPlayerInteractCallback("note_generic_3", "Spawn_Monster_three", 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, "");
}
void Spawn_Monster_two(string &in asEntity)
{
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, "");
}

void Spawn_Monster_three(string &in asEntity)
{
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);
}
this should do the job
weird. the first monster didn't spawn because the first key which had no name. randomly got the name of a key from the previous map and i also couldnt unlock the door
08-04-2012, 09:22 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: 3 Guest(s)