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
Script Help Can someone help me with a sequence
Hauken Offline
Member

Posts: 62
Threads: 19
Joined: Jul 2012
Reputation: 1
#1
Can someone help me with a sequence

So I followed a tutorial for doing a intro with logo and everything, after finishing it i trapped myself in a script of format im not used to do.

Here is the finished intro script, the goal is to add wakeup script which I already have.

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);
}

//////////////////////////////
//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);
    }


This script here works, when you start the CS this plays with a music showing team logo.

Now I need to add the wakeup script, for where we stand now you just spawn in the map with no wakeup obvioussly, I find it hard to wrap it up with the wake up script because im a noob and use the noob friendly timers usually but this tutorial did it like this.

Now i need to make this code below to work right after this script above. How can I do this, I am a noob with this - everything has been going smooth until this else if and if timing came up.

Wake up script:

PHP Code: (Select All)
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);

10-01-2013, 11:52 PM
Find


Messages In This Thread
Can someone help me with a sequence - by Hauken - 10-01-2013, 11:52 PM



Users browsing this thread: 1 Guest(s)