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 Crowbars!!
Zjurc Offline
Junior Member

Posts: 43
Threads: 8
Joined: Jan 2012
Reputation: 0
#11
RE: Crowbars!!

That is really odd. Maybe winrar messed something up. Here, ill copy paste everything:


PHP Code: (Select All)
void OnStart() 

    
AddEntityCollideCallback("Player""statueappear""MonsterFunction"true1); 
    
AddEntityCollideCallback("Player""statueappear_1""deadbodies"true1); 
    
AddEntityCollideCallback("Player""alldark""CollideTeleportToDarkSide"true1); 
    
AddEntityCollideCallback("Player""script_slam""func_slam"true1);
    
AddEntityCollideCallback("Player""metalheads""metalheads"true1); 
    
AddEntityCollideCallback("Player""metalheads2""metalheads2"true1); 
    
SetEntityPlayerInteractCallback("machineroomkey""spawn_func"true);
    
AddUseItemCallback("""crowbar""crowbardoor""CrowbarOnDoor"true);
    
AddEntityCollideCallback("crowbar_joint_1""door_script_1""crowbarfunc"true1);


void CrowbarOnDoor(string &in asItemstring &in asEntity)
{
SetEntityActive("crowbar_joint_1"true);
}


void crowbarfunc(string &in asParentstring &in asChildint alState)
{
SetPropHealth("crowbardoor"0.0f);
SetEntityActive("crowbar_joint_1"false);
SetEntityActive("crowbar_dyn_1"true);
}

void spawn_func(string &in item)
{
SetEntityActive("armour_rusty_complete_4"false);
SetEntityActive("armour_rusty_complete_3"false);
SetEntityActive("armour_rusty_complete_2"false);
SetEntityActive("armour_rusty_complete_1"false);
SetEntityActive("armour_rusty_complete_11"true);
SetEntityActive("armour_rusty_complete_12"true);
SetEntityActive("armour_rusty_complete_13"true);
SetEntityActive("armour_rusty_complete_14"true);
SetEntityActive("armour_rusty_complete_15"true);
}

void CollideTeleportToDarkSide(string &in asParentstring &in asChildint alState)
{
    
FadeOut(0.3);
    
    
AddTimer("scare"0.3f"TimerPlayerReact");    
    
AddTimer("breath"2.0f"TimerPlayerReact");    
    
AddTimer("breathl"4.0f"TimerPlayerReact");
    
AddTimer("breathl"6.0f"TimerPlayerReact");
    
    
AddTimer("TeleportHowl"0.5f"TimerTeleportHowl");    
    
AddTimer("TeleportDone"3.5f"TimerTelportDone");
    
    
PlaySoundAtEntity("stomp","scare_wall_stomp","Player"0false);
    
PlaySoundAtEntity("darkamb","07_amb_breath","Player"5true);
    
PlaySoundAtEntity("howl","guardian_activated.snt","Player"0false);
    
    
FadePlayerFOVMulTo(4.0f4.0f);
    
SetRadialBlurStartDist(0.1f);
    
FadeRadialBlurTo(1.0f5.0f);
    
    
StartEffectFlash(0.20.1,0.3);
    
    
StopMusic(0.3f0);
    
StartScreenShake(0.14.70.050.5);
    
    
FadePlayerFOVMulTo(0.53);
    
FadeGlobalSoundVolume(1,2);
    
SetPlayerActive(true);
    
FadePlayerFOVMulTo(1.0f0.5f);
    
FadeRadialBlurTo(0.0f1.0f);
    
FadeIn(3);
    
ChangePlayerStateToNormal();
    
    
}

void MonsterFunction(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("chained_prisoner_1"true); 
    
SetEntityActive("chained_prisoner_2"true); 
    
SetEntityActive("armour_rusty_complete_1"true); 
    
SetEntityActive("armour_rusty_complete_2"true); 
    
SetEntityActive("armour_rusty_complete_3"true); 
    
SetEntityActive("armour_rusty_complete_4"true); 
    
SetEntityActive("torch_static01_nosound_5"true); 
    
SetEntityActive("torch_static01_nosound_6"true); 
    
SetEntityActive("torch_static_green_1"true); 
    
SetEntityActive("torch_static_green_2"true); 
    
SetEntityActive("torch_static_green_3"true); 
    
SetEntityActive("torch_static_green_4"true); 
    
SetEntityActive("torch_static01_nosound_7"false); 
    
SetEntityActive("torch_static01_nosound_2"false); 
    
SetEntityActive("torch_static01_nosound_3"false); 
    
SetEntityActive("torch_static01_nosound_4"false); 
}

void metalheads(string &in asParentstring &in asChildint alState)
{
SetEntityActive("armour_rusty_complete_5"true); 
SetEntityActive("armour_rusty_complete_6"true); 
SetEntityActive("armour_rusty_complete_7"true); 
}
void metalheads2(string &in asParentstring &in asChildint alState)
{
SetEntityActive("armour_rusty_complete_8"false); 
SetEntityActive("armour_rusty_complete_9"false); 
SetEntityActive("armour_rusty_complete_10"false); 
}
void func_slam(string &in asParentstring &in asChildint alState)
{
SetSwingDoorClosed("door2"truetrue);
 
PlaySoundAtEntity("""react_breath_slow.snt""Player"0false); 
 
PlaySoundAtEntity("""react_scare""Player"0false);  PlaySoundAtEntity("""close_door.snt""Player"0false); 
 
GiveSanityDamage(5.0ftrue);


01-26-2012, 05:23 PM
Find
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#12
RE: Crowbars!!

You've forgot to check the "ItemInteraction" box.


Edit: I mean the "door_script_1" area in the level editor. If that wasn't clear ^^
(This post was last modified: 01-27-2012, 11:30 PM by i3670.)
01-27-2012, 11:16 PM
Find
Zjurc Offline
Junior Member

Posts: 43
Threads: 8
Joined: Jan 2012
Reputation: 0
#13
RE: Crowbars!!

Well I guess I'm f**king retarded Big Grin I will go do that now and post results
Yeah It works now! Thanks for all your help!
(This post was last modified: 01-28-2012, 12:29 PM by Zjurc.)
01-28-2012, 12:15 PM
Find
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#14
RE: Crowbars!!

Hey, we're all human. And humans make mistakes.
01-28-2012, 01:18 PM
Find




Users browsing this thread: 1 Guest(s)