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
Can't get scare script to work
zergling50 Offline
Member

Posts: 74
Threads: 9
Joined: Jul 2012
Reputation: 1
#1
Can't get scare script to work

Here is my script:

////////////////////////////
// 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);
}
////////////////////////////
// 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 asEntity)
{
SetPlayerActive(false);
StartPlayerLookAt("ScriptArea_2", 2, 3, "StopLook");
AddPropImpulse("arabic_carafe_3", 10, 0, 0, "world");
GiveSanityDamage(3, true);
SetPlayerActive(true);
}
void StopLook()
{
StopPlayerLookAt();
}

im trying to get the LampScare script to work, but as of now the game runs fine but when I enter ScriptArea_1 nothing happens. I get no errors or anything.
(This post was last modified: 01-06-2013, 06:43 PM by zergling50.)
01-06-2013, 06:35 PM
Find


Messages In This Thread
Can't get scare script to work - by zergling50 - 01-06-2013, 06:35 PM
RE: Can't get scare script to work - by DnALANGE - 01-06-2013, 06:38 PM
RE: Can't get scare script to work - by DnALANGE - 01-06-2013, 06:46 PM
RE: Can't get scare script to work - by Victor - 01-08-2013, 04:46 PM



Users browsing this thread: 2 Guest(s)