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 wont work
Dizturbed Offline
Member

Posts: 160
Threads: 39
Joined: Jun 2011
Reputation: 0
#1
Script wont work

This is my script that wont work in-game, well I want a monster to spawn whenthe player enters an area, pretty easy I know, but it wont work, help please.

PHP Code: (Select All)
void Onstart()
{
SetPlayerMoveSpeedMul(0.75f);
SetPlayerRunSpeedMul(0.90f);
PlayMusic("22_amb.ogg", true, 5, 4.0f, 0, false); //Plays music.
AddEntityCollideCallback("Player", "SpawnSuitor", "SpawnMonster", true, 0);
AddEntityCollideCallback("Suitor", "DepawnSuitor", "DespawnMonster", true, 0);
AddUseItemCallback("", "key_tower_1", "level_wood_1", "UnlockDoor", true);
}
void SpawnMonster(string &in asParent, string &in asChild, int alState) 
{
SetEntityActive("Suitor", true);
AddEnemyPatrolNode("Suitor", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("Suitor", "PathNodeArea_2", 0, "");
StartPlayerLookAt("Suitor", 10.0f, 10.0f, "");
SetPlayerActive(false);
PlayGuiSound("react_breath6.ogg", 1.0f);
AddTimer("Timer", 2.5f, "NoLook");
}
void NoLook(string&in asTimer)
{
StopPlayerLookAt();
AddTimer("Timer", 1.0f, "LookAtTree");
SetEntityActive("Suitor_1", false);
}
void LookAtTree(string&in asTimer)
{
StartPlayerLookAt("falling_tree_1", 10.0f, 10.0f, "");
PlayGuiSound("joint_bend_door.ogg", 10.0f);
StartScreenShake(1.0f, 1.0f, 2.0f, 3.0f);
AddTimer("Timer", 1.0f, "LookAtTree2");
}
void LookAtTree2(string&in asTimer)
{
SetEntityActive("falling_tree_2", true);
SetEntityActive("falling_tree_1", false);
PlayGuiSound("lurker_hit_wood4.ogg", 10.0f);
AddTimer("Timer", 1.0f, "LookAtMonster");
}
void LookAtMonster(string&in asTimer)
{
AddEnemyPatrolNode("Suitor", "PathNodeArea_3", 0, "");
SetEntityActive("Suitor", true);
StartPlayerLookAt("Suitor", 10.0f, 10.0f, "");
SetPlayerCrouching(true);
GiveSanityDamage(50.0f, true);
PlayGuiSound("react_pant2.ogg", 0.4f);
PlayGuiSound("react_breath3.ogg", 1.0f);
FadeOut(3.0f);
}
void DespawnMonster(string &in asParent, string &in asChild, int alState) 
{
SetEntityActive("Suitor", false);
} 
-Dizturbed

07-31-2011, 04:56 PM
Find


Messages In This Thread
Script wont work - by Dizturbed - 07-31-2011, 04:56 PM
RE: Script wont work - by ObsidianLegion - 07-31-2011, 05:00 PM
RE: Script wont work - by Dizturbed - 07-31-2011, 05:01 PM
RE: Script wont work - by ObsidianLegion - 07-31-2011, 05:02 PM
RE: Script wont work - by MrCookieh - 07-31-2011, 05:05 PM
RE: Script wont work - by Dizturbed - 07-31-2011, 05:09 PM
RE: Script wont work - by MrCookieh - 07-31-2011, 05:11 PM
RE: Script wont work - by ObsidianLegion - 07-31-2011, 05:27 PM
RE: Script wont work - by Kyle - 07-31-2011, 05:28 PM
RE: Script wont work - by ObsidianLegion - 07-31-2011, 05:31 PM
RE: Script wont work - by Dizturbed - 07-31-2011, 05:13 PM



Users browsing this thread: 1 Guest(s)