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
Script Help Teleporting-Naked-Guy Help
CQBgamer Offline
Junior Member

Posts: 40
Threads: 8
Joined: Jul 2014
Reputation: 0
#1
Teleporting-Naked-Guy Help

So I wanted my script to run a function that will activate and launch a corpse out of a cabinet once the player gets killed by a patrolling grunt. Once I die and enter my script area infront of the cabinet nothing happens.

/////////////////////////////////////////////////////////////////////////////////////////

// On map start //
void OnStart()
{
    AddUseItemCallback("", "Storage_Room_Key", "Storage_Room_Door", "Open_Storage_Room", true);
    // Storage Room Key //
    AddEntityCollideCallback("Player", "poofer_spawn_01", "poofer_spawn_script_01", true, 1);
}

void poofer_spawn_script_01(string &in asParent, string &in asChild, int alState)
{
CheckPoint ("*C1", "*C1_spawn", "*FunctionToCall*", "DeathHints", "Hide");

   AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_1", 0.001, "");
   AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_2", 0.001, "");  
   AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_3", 0.001, "");  
   AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_4", 0.001, "");  
   AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_5", 0.001, "");
   AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_6", 0.001, "");  
   AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_7", 0.001, "");  
   AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_8", 0.001, "");  
   AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_9", 0.001, "");  
   AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_10", 0.001, "");  
   AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_11", 0.001, "");    
   AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_12", 0.001, "");  
   AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_13", 0.001, "");  
   AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_14", 0.001, "");  
   AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_15", 0.001, "");  
   AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_16", 0.001, "");  
   AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_17", 0.001, "");  
   AddEnemyPatrolNode("poofer_grunt_01", "PathNodeArea_18", 1.000, "");
   SetEntityActive("poofer_grunt_01", true);
}

void FunctionToCall(string &in asName, int alCount)
{
AddEntityCollideCallback("Player", "Teleport_Script", "Nail_That_Sucker01", true, 1);
}

void Open_Storage_Room(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("Storage_Room_Door", false, true);
    PlaySoundAtEntity("", "unlock_door", "Player", 0, false);
    RemoveItem("Storage_Room_Key");
}

void Nail_That_Sucker01(string &in asParent, string &in asChild, int alState)
{
    SetEntityActive("Naked_Guy01", true);
    AddPropForce("Naked_Guy01", -10000, 0, 0, "world");
    PlaySoundAtEntity("", "24_iron_maiden.snt", "Naked_Guy01", 0, false);
}

// On Entering map //
void OnEnter()
{

}
// On Leaving map //
void OnLeave()
{

}

[Image: 15420.png]
07-05-2014, 12:04 AM
Find


Messages In This Thread
Teleporting-Naked-Guy Help - by CQBgamer - 07-05-2014, 12:04 AM
RE: Teleporting-Naked-Guy Help - by CQBgamer - 07-05-2014, 12:30 AM
RE: Teleporting-Naked-Guy Help - by The chaser - 07-05-2014, 12:33 AM
RE: Teleporting-Naked-Guy Help - by CQBgamer - 07-05-2014, 12:49 AM
RE: Teleporting-Naked-Guy Help - by MrBehemoth - 07-05-2014, 12:55 AM
RE: Teleporting-Naked-Guy Help - by The chaser - 07-05-2014, 12:59 AM
RE: Teleporting-Naked-Guy Help - by CQBgamer - 07-05-2014, 01:05 AM
RE: Teleporting-Naked-Guy Help - by The chaser - 07-05-2014, 01:13 AM
RE: Teleporting-Naked-Guy Help - by CQBgamer - 07-05-2014, 01:35 AM
RE: Teleporting-Naked-Guy Help - by The chaser - 07-05-2014, 09:55 AM
RE: Teleporting-Naked-Guy Help - by CQBgamer - 07-05-2014, 09:59 AM
RE: Teleporting-Naked-Guy Help - by CQBgamer - 07-05-2014, 10:43 AM
RE: Teleporting-Naked-Guy Help - by CQBgamer - 07-05-2014, 10:53 AM
RE: Teleporting-Naked-Guy Help - by The chaser - 07-05-2014, 10:44 AM
RE: Teleporting-Naked-Guy Help - by CQBgamer - 07-08-2014, 12:48 AM
RE: Teleporting-Naked-Guy Help - by CQBgamer - 07-08-2014, 03:38 AM
RE: Teleporting-Naked-Guy Help - by CQBgamer - 07-08-2014, 05:23 AM
RE: Teleporting-Naked-Guy Help - by Mudbill - 07-08-2014, 05:25 AM
RE: Teleporting-Naked-Guy Help - by CQBgamer - 07-08-2014, 05:35 AM



Users browsing this thread: 2 Guest(s)