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
Script Help Need help with Crowbar on door
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#6
RE: Need help with Crowbar on door

this is my hps and crowbar open the door like a key it dosnt work at all cant get it to work Sad i have made that with Crowbar_joint_1 dosnt work
PHP Code: (Select All)
oid OnStart()
{
//START MOVE SHELF EVENT1
    
SetEntityConnectionStateChangeCallback("lever""func_shelf");
//END MOVE SHELF EVENT1

//START SERVANT BRUTE EVENT1
    
AddEntityCollideCallback("Player""monsterspawn_1""MonsterFunction"true1); 
    
AddEntityCollideCallback("servant_brute_1""servant_grunt_1_remove""RemoveMonster"true1);
//END SERVANT BRUTE EVENT1

//START CROWBAR EVENT1
    
AddUseItemCallback("""crowbar_1""mansion_1""CrowbarOnDoor"true);
    
AddEntityCollideCallback("crowbar_joint_1""door_script_1""crowbarfunc"true1);
//END CROWBAR EVENT1
}
void crowbar(string &in asItemstring &in asEntity)
 {
 
SetEntityActive("crowbar_joint_1"true);
 }


 
void crowbarfunc(string &in asParentstring &in asChildint alState)
 {
 
SetPropHealth("mansion_1"0.0f);
 
SetEntityActive("crowbar_joint_1"false);
 
SetEntityActive("crowbar_1"true);
 }
//START MOVE SHELF EVENT1
void func_shelf(string &in asEntityint alState)
{
if (
alState == 1)
{
    
SetMoveObjectState("shelf",1.0f);
    
PlaySoundAtEntity("""quest_completed.snt""shelf_move_1"0false);
    return;
}
}
//END MOVE SHELF EVENT1


//START SERVANT BRUTE EVENT1 
void MonsterFunction(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("servant_brute_1"true); 
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_1"2"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_2"0"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_3"0"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_4"2"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_5"0"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_6"0"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_7"2"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_8"0"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_9"0"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_10"2"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_11"0"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_12"0"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_13"0"");
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_14"0"");
    
    }    

void RemoveMonster(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("servant_brute_1"false);

//END SERVANT BRUTE EVENT1

//START CROWBAR EVENT1
void CrowbarOnDoor(string &in itemstring &in door)
{
    
SetSwingDoorLocked("mansion_1"falsetrue);
    
PlaySoundAtEntity("""unlock_door""mansion_1"0false);
    
RemoveItem("crowbar_1");
}
//END CROWBAR EVENT1

void OnEnter() 
{

}

void OnLeave() 
{



http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
(This post was last modified: 12-30-2011, 08:28 PM by jessehmusic.)
12-30-2011, 08:28 PM
Website Find


Messages In This Thread
Need help with Crowbar on door - by jessehmusic - 12-30-2011, 04:10 AM
RE: Need help with Crowbar on door - by flamez3 - 12-30-2011, 05:58 AM
RE: Need help with Crowbar on door - by flamez3 - 12-30-2011, 04:04 PM
RE: Need help with Crowbar on door - by jessehmusic - 12-30-2011, 08:28 PM
RE: Need help with Crowbar on door - by flamez3 - 12-31-2011, 02:06 AM



Users browsing this thread: 2 Guest(s)