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
How to make more than 1 script?
FrictionalWeekly Offline
Junior Member

Posts: 19
Threads: 6
Joined: Apr 2011
Reputation: 2
#1
How to make more than 1 script?

I'm having trouble making my first custom story because I'm newby with scripts. I'm having trouble making 2 scripts in 1 map mainly and it's frustrating.

Here's what it is that I'm trying to do that's wrong somehow

_____________________________________________________________

void OnEnter()

{
PlayMusic("penumbra_music_E1_D1", true, 1, 0, 0, true);
}

void DoggyAttackPart(string &in asEntity, string &in type)
{
SetEntityActive("doggy", true);
StartPlayerLookAt("doggy", 15, 15, "");
AddTimer("monstertimer", 2, "monstertimer");
ShowEnemyPlayerPosition("doggy");
}

void monstertimer(string &in asTimer)
{
StopPlayerLookAt();
}


//////// Scare music in bloody room
void AddEntityCollideCallback("Player", "scare_script", "scare_script", false, 0);



void scare_script(string &in asParent, string &in asChild, int alState)
{
//music scripts here
// If enters and leave
if(alState == 1)
{
PlayMusic("Penumbra_BP_C1.ogg", false, 1.00, 0, 5, true);
}
if(alState == -1)
{

}
_____________________________________________________________________________________



And this is the error that pops up when it tries to load the map.



___________________________________________

FATAL ERROR: Could not load script file 'custom_stories/Zombie
Survival/maps/C;/Program Files (x86)/Amnesia - The Dark
Descent/redist/custom_stories/Zombie Survival/maps/lv3.hps'!
ExecuteString (1, 1) : ERR : No matching signatures to 'OnLeave()'
main (37, 2): ERR : Unexpected end of file

__________________________________________
(This post was last modified: 06-02-2012, 11:34 PM by FrictionalWeekly.)
06-02-2012, 11:18 PM
Find


Messages In This Thread
How to make more than 1 script? - by FrictionalWeekly - 06-02-2012, 11:18 PM
RE: How to make more than 1 script? - by Bridge - 06-02-2012, 11:42 PM
RE: How to make more than 1 script? - by palistov - 06-02-2012, 11:53 PM
RE: How to make more than 1 script? - by Bridge - 06-02-2012, 11:56 PM
RE: How to make more than 1 script? - by Putmalk - 06-03-2012, 06:52 AM



Users browsing this thread: 1 Guest(s)