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 Can someone help me with a sequence
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#3
RE: Can someone help me with a sequence

Scripting time.

Spoiler below!
PHP Code: (Select All)
////////////////////////////
// Run first time starting map
void OnStart()
{
    
AddUseItemCallback("""Key_1""door1""FUNCTION"true);
    
SetEntityPlayerInteractCallback("Key_1""PickedUpKey"true);
    
SetEntityPlayerInteractCallback("phonograph_2""phono1"true);
    
//PlayMusic("/music/06_amb", true, 1, 0, 0, true);
    
AddEntityCollideCallback("Player""script_wellwhine""func_whine"true1);
    
AddEntityCollideCallback("Player""script_prision_slammer""prisiondoorslammer"true1);
    
AddEntityCollideCallback("Player""memorial_windwhirl""func_memorialwhine"true1);
    
/////INTRO////
    
TeleportPlayer("Intro_0");
    
FadeOut(0);
    
SetPlayerActive(false);
    
SetSanityDrainDisabled(true);
    
ShowPlayerCrossHairIcons(false);
    
AddTimer("fadein"5"TimerIntroOutro");
    
PlayMusic("silent_intro"false101true);
       
////WAKEUP////
      
wakeUp();
}

//////////////////////////////
//Intro//////////////////////
////////////////////////////

void TimerIntroOutro(string &in asTimer)
{
    if(
GetLocalVarInt("Intro") < 1) {

        if(
asTimer == "fadein") {
            
TeleportPlayer("intro_" GetLocalVarInt("Intro"));
            
FadeIn(3);
            
AddTimer("fadeout"5"TimerIntroOutro");
        }

        if(
asTimer == "fadeout") {
            
FadeOut(3);
            
AddTimer("fadein"5"TimerIntroOutro");
            
AddLocalVarInt("Intro"1);
        }
    }
    else
    {
        
TeleportPlayer("PlayerStartArea_1");
        
FadeIn(2);
        
SetPlayerActive(true);
        
SetSanityDrainDisabled(false);
        
ShowPlayerCrossHairIcons(true);

        
PlayMusic("silent_intro"false0.212true);
    }

    if(
asTimer == "outro") {
        
StartCredits("in_motion.ogg"false"Credits""Ending"3);
    }
}

void wakeUp () {
    
FadeOut(0);     // Instantly fades the screen out. (Good for starting the game)
    
FadeIn(20);      // Amount of seconds the fade in takes
    
FadeImageTrailTo(22);
    
FadeSepiaColorTo(1004);
    
SetPlayerActive(false);    
    
FadePlayerRollTo(50220220);                 // "Tilts" the players head
    
FadeRadialBlurTo(0.152);
    
SetPlayerCrouching(true);              // Simulates being on the ground
    
AddTimer("trig1"11.0f"beginStory");            // Change '11.0f' to however long you want the 'unconciousness' to last
}

void beginStory(string &in asTimer){
    
ChangePlayerStateToNormal();
    
SetPlayerActive(true);
    
FadePlayerRollTo(03333);        // Change all settings to defaults
    
FadeRadialBlurTo(0.01);
    
FadeSepiaColorTo(04);
    
SetPlayerCrouching(false);
    
FadeImageTrailTo(0,1);



EDIT:
Use R0mul8r's script if you wanted it to happen in a designated time.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 10-02-2013, 08:25 AM by PutraenusAlivius.)
10-02-2013, 08:20 AM
Find


Messages In This Thread
Can someone help me with a sequence - by Hauken - 10-01-2013, 11:52 PM
RE: Can someone help me with a sequence - by PutraenusAlivius - 10-02-2013, 08:20 AM



Users browsing this thread: 1 Guest(s)