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
Help with inactive statue
EddieShoe Offline
Junior Member

Posts: 28
Threads: 6
Joined: Sep 2010
Reputation: 0
#1
Information  Help with inactive statue

I've added an inactive statue on my map, I've double-checked that it has been set to inactive but still every time I try to make it appear by entering a trigger area it is already there. I have tried adding a script to set it to inactive on map entry but it does not work as well, he is still there before entering the script area. Any ideas? Here's my script file:

////////////////////////////
// Run first time starting map
void OnStart()
{
    AddEntityCollideCallback("Player", "PlateBreak", "BreakPlate", true, 1);
    AddEntityCollideCallback("Player", "Footstep", "Footsteps", true, 1);
    AddEntityCollideCallback("Player", "TriggerVoice", "VoiceTrigger", true, 1);    
    SetEntityActive("ManScare", false);
}

void BreakPlate(string &in asParent, string &in asChild, int alState)
{
    AddTimer("timer01", 1.5f, "BreakPlate1");
    PlaySoundAtEntity("", "scare_tingeling.snt", "Player", 0, false);
}

void Footsteps(string &in asParent, string &in asChild, int alState)
{
    PlaySoundAtEntity("", "scare_steps_big.snt", "candlestick_wall_10", 0, false);
}

void BreakPlate1(string &in asTimer)
{
    SetPropHealth("plate_9", 0);
    SetPropHealth("plate_3", 0);
    SetPropHealth("plate_8", 0);
    AddPropImpulse("chair_nice02_8", 4, 8, 0, "world");
    AddPropImpulse("chair_nice02_11", 6, 10, 0, "world");
    AddPropImpulse("chair_nice02_1", 0, 0, -14, "world");
    GiveSanityDamage(3, true);    
}

void ManScream(string &in asEntity, int alState)
{
    PlaySoundAtEntity("", "scare_male_terrified5.snt", "Player", 0, false);
    GiveSanityDamage(5, true);
}

void VoiceTrigger(string &in asParent, string &in asChild, int alState)
{
    SetEntityActive("ManScare", true);
    PlaySoundAtEntity("", "enemy_hallucination_disappear.snt", "Player", 0, false);
    AddTimer("timer02", 1.0f, "RemoveMan1");
}

void RemoveMan1(string &in asTimer)
{
    SetEntityActive("ManScare", false);
}

////////////////////////////
// Run when entering map
void OnEnter()
{
    StopMusic(0,1);
    PlayMusic("02_amb_strange.ogg", true, 1, 4, 0, false);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

Currently working on: "Awake"
Progress: ~5%
(This post was last modified: 09-01-2013, 02:14 PM by EddieShoe.)
08-30-2013, 10:19 PM
Find


Messages In This Thread
Help with inactive statue - by EddieShoe - 08-30-2013, 10:19 PM
RE: Help with inactive statue - by Kurton - 08-30-2013, 10:38 PM
RE: Help with inactive statue - by DeAngelo - 08-30-2013, 10:42 PM
RE: Help with inactive statue - by EddieShoe - 08-30-2013, 10:51 PM
RE: Help with inactive statue - by EddieShoe - 08-31-2013, 12:17 PM
RE: Help with inactive statue - by EddieShoe - 08-31-2013, 12:44 PM
RE: Help with inactive statue - by Your Computer - 09-01-2013, 02:43 AM
RE: Help with inactive statue - by EddieShoe - 09-01-2013, 04:40 AM
RE: Help with inactive statue - by Your Computer - 09-01-2013, 09:29 AM
RE: Help with inactive statue - by EddieShoe - 09-01-2013, 01:52 PM



Users browsing this thread: 1 Guest(s)