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
ceiling doll not appearing!
Gamemakingdude Offline
Senior Member

Posts: 470
Threads: 82
Joined: Nov 2010
Reputation: 9
#1
ceiling doll not appearing!

PHP Code: (Select All)
//Global Variables
bool GruntScareDone false;
bool chairScare false;

////////////////////////////
// Run first time starting map
void OnStart()
{
    
//Add the Lantern and 10 Tinderboxes when in Debug mode, always good to have light!
    
if(ScriptDebugOn())
    {
        
GiveItemFromFile("lantern""lantern.ent");
 
        for(
int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i"tinderbox.ent");
    }
    
SetEntityPlayerInteractCallback("Key_1""HammerScare"true);
    
AddUseItemCallback("""Key_1""mansion_1""UsedKeyOnDoor"true);
    
AddEntityCollideCallback("Player","script_chairscare","ChairScare"false1);
    
AddEntityCollideCallback("Player","script_GruntScare","GruntScare",false,1);
    
SetEntityConnectionStateChangeCallback("lever_nice01_1""func_shelf");
    
AddEntityCollideCallback("Player","script_dollscare","DollScare",false,1);
    for (
int x 123x++) {
        
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_"+x0"");
        }
    
AddEntityCollideCallback("servant_grunt_1""ScriptArea_1""Reverse"false1);

    for (
int x 24188x++) {
        
AddEnemyPatrolNode("servant_brute_deadiler_1""PathNodeArea_"+x0"");
        }
    for (
int x 240x--) {
        
AddEnemyPatrolNode("servant_brute_deadiler_1""PathNodeArea_"+x0"");
        }

}

void Reverse() {
    for (
int x 231x--) {
        
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_"+x0"");
        }
}
void UsedKeyOnDoor(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked(asEntity,false,true);
    
PlaySoundAtEntity("","unlock_door"asEntity0false);
    
RemoveItem(asItem);
}

void DollScare(string &in entitystring &in type) {
    
SetEntityActive("ceiling_doll_1",true);
    
AddPlayerBodyForce(0,0,100000,false);
    }

void HammerScare(string &in entitystring &in type)
{
  
AddPropImpulse("sledge_1"30520"world");
  
PlaySoundAtEntity("FistPump""FistPump.snt","Player"0false);
}

void ChairScare(string &in asParentstring &in asChildint alState)
{
  
//SetEntityActive("chairscare",false);
  
if(chairScare == false) {
      
PlaySoundAtEntity("StephanoScream""StephanoScream.snt","Player"0false);
      
AddPropImpulse("chairscare"00, -25"world");
      
chairScare true;
      
AddTimer("1",2.0f,"StephanoDisappear");
}
}

void GruntScare(string &in asParentstring &in asChildint alState)
{
    if(
GruntScareDone == false) {
        
SetEntityActive("servant_grunt_ragdoll_1",true);
        
PlaySoundAtEntity("","react_scare","Player",0,false);
        
AddPropImpulse("servant_grunt_ragdoll_1"3000"world");
        
SetEntityActive("Stephano",true);
        
PlaySoundAtEntity("HelloStephano""HelloStephano.snt","Player"0false);
        
AddTimer("1",3.0f,"CloseDoor");
        
AddTimer("2",4.0f,"CloseDoor");
        
GruntScareDone true;
}
}

void CloseDoor(string &in asTimer) {
    if (
asTimer == "1") {
        
SetSwingDoorClosed("mansion_3"truetrue);
        
SetEntityActive("SpotLight_2",false);
    }
    if (
asTimer == "2") {
    
SetSwingDoorLocked("mansion_3"truetrue);
    }
}

void StephanoDisappear(string &in asTimer) {
    if(
asTimer == "1") {
        
SetEntityActive("chairscare",false);
    }
}


void func_shelf(string &in asEntityint alState)
{
     if (
alState == 1)
     {
     
SetMoveObjectState("shelf_secret_door_rot_1",1.0f);
     
PlaySoundAtEntity("""quest_completed.snt""shelf_move_1"0false);
          return;
     }
    
/* if (alState == 0)
     {
     SetMoveObjectState("shelf_secret_door_rot_1",0.0f);
        return;
    }*/
}

void InsaneMoment(string &inEntity) {
    
SetMoveObjectState("shelf_secret_door_rot_1",0.0f);
    
StartPlayerLookAt("shelf_secret_door_rot_1",10,100,"");
    
StartScreenShake(0.3f,10.0f,3.0f,1.0f);
    
AddTimer("1"2.0f,"Stare");
    
AddTimer("2"4.0f"Stare");
    
AddTimer("3"6.0f"Stare");
    
AddTimer("4"8.0f"Stare");
    
AddTimer("5"10.0f"Stare");
    
AddTimer("6"12.0f"Stare");
    
AddTimer("7"14.0f"Stare");
}

void Introduce(string &inEntity) {
    
PlaySoundAtEntity("IntroduceMartin""IntroduceMartin.snt","Player"0false);
    }
void Stare(string &in asTimer) {
    if(
asTimer == "1") {
        
        
SetEntityActive("painting_portrait_insane_1"true);
        
CreateParticleSystemAtEntity("PSDustPainting""ps_ghost_release.ps""painting_portrait_insane_1"false);
        
StartPlayerLookAt("painting_portrait_insane_1"10100"");
        
PlaySoundAtEntity("snd_scare""react_scare.snt""Player"0.0false);
        
GiveSanityDamage(3true);
        
CreateParticleSystemAtEntity("PSRoses""rose_petals_loop.ps""chandelier_nice_1"false);
    }
    if(
asTimer == "2") {
        
SetEntityActive("spider_2",true);
        
StartPlayerLookAt("spider_2"10100"");
        
GiveSanityDamage(3true);
        }
    if(
asTimer == "3") {
        
StopPlayerLookAt();
        
SetLampLit("chandelier_nice_1"falsefalse);
        
SetLampLit("bonfire_1"truetrue);
        }
    if(
asTimer == "4") {
        
SetEntityActive("chandelier_nice_1"false);
        
SetEntityActive("hanging_prisoner_1"true);
        
StartPlayerLookAt("hanging_prisoner_1"10100"");
        
GiveSanityDamage(3true);
        }
    if(
asTimer == "5") {
        
StopPlayerLookAt();
        
SetEntityActive("corpse_male_1"true);
        
StartPlayerLookAt("corpse_male_1"10100"");
        
AddPropImpulse("corpse_male_1",0,0,-200"world");    
        
GiveSanityDamage(10,true);
        }
    if(
asTimer == "6") {
        
StopPlayerLookAt();
        
SetEntityActive("painting_portrait_insane_1"false);
        
SetEntityActive("spider_2",false);
        
SetEntityActive("chandelier_nice_1"false);
        
SetEntityActive("hanging_prisoner_1"false);
        
SetEntityActive("corpse_male_1"false);
        
SetEntityActive("chandelier_nice_1"true);
        
SetMoveObjectState("shelf_secret_door_rot_1",1.0f);
    if(
asTimer == "7") {
        
SetEntityActive("CustomPainting_1",true);
        }
}
}

////////////////////////////
// Run when entering map
void OnEnter()
{
 
}
 
////////////////////////////
// Run when leaving map
void OnLeave()
{
 


The part is the dollscare. I have named everything correctly but nothing happens in the game!

Rep if like me or im helpful or you love my stories!
Stephanos house
10-07-2011, 12:18 PM
Find


Messages In This Thread
ceiling doll not appearing! - by Gamemakingdude - 10-07-2011, 12:18 PM
RE: ceiling doll not appearing! - by Tanshaydar - 10-07-2011, 12:33 PM
RE: ceiling doll not appearing! - by Tanshaydar - 10-07-2011, 12:48 PM



Users browsing this thread: 5 Guest(s)