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
problem with scare script
zergling50 Offline
Member

Posts: 74
Threads: 9
Joined: Jul 2012
Reputation: 1
#1
problem with scare script

I want to make it so that a door flings open and there is a man (corpse) standing on the other side, and then he suddenly disappears.
It gives me an error and terminates the program when I launch and I can't find the problem.

Here's my code:
(*note the code im talking about is CorpseDoorScare*)
////////////////////////////
// Run when starting map
void OnStart()
{
SetEntityPlayerInteractCallback("mansion_1", "GetCrowDoorQuest", true);
AddUseItemCallback("", "crowbar_1", "mansion_1", "CrowDoorBreak", true);
AddEntityCollideCallback("Player", "ScriptArea_1", "LampScare", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "CorpseDoorScare", true, 1);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}

void GetCrowDoorQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("", "crowdoorquest");
}
void CrowDoorBreak(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("", "break_wood_metal", asEntity, 0.0f, false);
PlaySoundAtEntity("", "impact_metal_high", asEntity, 0.0f, false);
SetPropHealth(asEntity, 0);
GiveSanityBoostSmall();
SetEntityActive("crowbar_broken_1", true);
RemoveItem(asItem);
SetMessage("GameMessage", "crow_door_message", 4);
}
void CompleteCrowDoor(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("", "crowdoorquest");
}
void LampScare(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
StartPlayerLookAt("ScriptArea_2", 2, 3, "StopLook");
AddPropImpulse("arabic_carafe_3", 10, 0, 0, "world");
GiveSanityDamage(3, true);
SetPlayerActive(true);
}
void StopLook()
{
StopPlayerLookAt();
}
void CorpseDoorscare(string &in asParent, string &in asChild, int alState);
{
SetPlayerActive(false);
SetEntityActive("corpse_male_1", true);
AddPropImpulse("mansion_6", 20, 0, 0, "world");
StartPlayerLookAt("corpse_male_1", 2, 3, "StopLook2");
PlaySoundAtEntity("", "insanity_baby_cry_custom", asEntity, 0.0f, false);
PlaySoundAtEntity("", "insanity_imageflash01_custom", asEntity, 0.0f, false);
}
void StopLook2()
{
StopPlayerLookAt();
SetEntityActive("corpse_male_1", false);
SetPlayerActive(true);
}

FYI, the custom sounds are in a folder within my custom story that is labeled correctly, they work in other maps so I know that's not the problem.
(This post was last modified: 06-13-2013, 08:15 PM by zergling50.)
01-06-2013, 10:18 PM
Find


Messages In This Thread
problem with scare script - by zergling50 - 01-06-2013, 10:18 PM
RE: problem with scare script - by Rapture - 01-06-2013, 10:33 PM
RE: problem with scare script - by zergling50 - 01-08-2013, 01:34 AM
RE: problem with scare script - by Damascus - 01-07-2013, 03:10 AM
RE: problem with scare script - by Victor - 01-08-2013, 04:32 PM
RE: problem with scare script - by Damascus - 01-08-2013, 08:14 PM
RE: problem with scare script - by zergling50 - 04-06-2013, 08:16 PM
RE: problem with scare script - by Kreekakon - 04-06-2013, 08:29 PM
RE: problem with scare script - by zergling50 - 04-06-2013, 09:01 PM
RE: problem with scare script - by NaxEla - 04-07-2013, 12:58 AM
RE: problem with scare script - by Tiger - 04-07-2013, 01:56 AM
RE: problem with scare script - by NaxEla - 04-07-2013, 04:53 AM
RE: problem with scare script - by Tiger - 04-07-2013, 04:43 PM
RE: problem with scare script - by zergling50 - 04-07-2013, 08:37 PM
RE: problem with scare script - by zergling50 - 04-07-2013, 09:42 PM
RE: problem with scare script - by noovra - 04-08-2013, 02:05 AM
RE: problem with scare script - by Linus Ågren - 04-08-2013, 09:00 AM
RE: problem with scare script - by noovra - 04-08-2013, 01:03 PM
RE: problem with scare script - by zergling50 - 04-10-2013, 11:46 PM
RE: problem with scare script - by NaxEla - 04-11-2013, 12:36 AM
RE: problem with scare script - by zergling50 - 06-11-2013, 08:22 PM
RE: problem with scare script - by GrAVit - 06-12-2013, 08:16 AM
RE: problem with scare script - by Daemian - 06-12-2013, 12:19 PM
RE: problem with scare script - by zergling50 - 06-13-2013, 08:13 PM



Users browsing this thread: 1 Guest(s)