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
ObsidianLegion Offline
Member

Posts: 173
Threads: 53
Joined: Jun 2011
Reputation: 0
#2
RE: Script wont work

(07-31-2011, 04:56 PM)Dizturbed Wrote: 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

Tell me what the error is. Assuming it comes up with one

"Good men mean well; they just don't always end up doing well." -Isaac Clarke, Dead Space 2, Chapter 12
07-31-2011, 05:00 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)