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
Help needed with "Intro script"
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#5
RE: Help needed with "Intro script"

(07-17-2011, 07:38 PM)palistov Wrote: I'm not sure if there was a question in your reply haha. OK well to stop the player from moving use SetPlayerActive(false);

Make sure you use SetPlayerActive(true); later so the player can move again Tongue

The switch function isn't too hard to understand once you get the hang of it. Think of it like a music playlist. The first song (case 1) plays first, then the timer calls the function again and this time it plays the second song (case 2), and it keeps going until there are no more songs (no more cases!).

You need to use those functions I posted above in a switch function to efficiently make a faint/wake up sequence. Just practice. Smile

Oh now i have it thanks. But i have this script but why player is still 90 degrees.. all the time no stops after that teleport.

Whole script just in case:

void OnStart()

{
// AddEntityCollideBacks
AddEntityCollideCallback("Player", "Felldown", "Teleport1", true, 1);










FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);

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);
FadeSepiaColorTo(0.5f, 0.5f);
FadeRadialBlurTo(0.7f, 0.5f);
FadePlayerRollTo(0, 33, 33); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
SetPlayerMoveSpeedMul(0.2);
PlayMusic("29_amb_end_daniel", false, 3, 3, 10, true);
}






void OnEnter()
{
}


// Functions
void Teleport1(string &in asParent, string &in asChild, int alState)
{
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(80.0f, 80.0f, 100.0f);
FadeOut(0.45f);
GiveSanityDamage(100, true);
AddTimer("tele", 3, "Teleport");
}

void Teleport(string &in asTimer)
{
TeleportPlayer("PlayerStartArea_2");
AddTimer("trig1", 8.0f, "beginStory2");
}

void beginStory2(string &in asTimer){
FadeIn(3);
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
PlayMusic("16_amb", false, 3, 3, 10, true);
}








void OnLeave()
{
}

EDIT: Nothing I solved it ! Thanks for your help!

“Life is a game, play it”
(This post was last modified: 07-17-2011, 08:13 PM by HumiliatioN.)
07-17-2011, 07:46 PM
Find


Messages In This Thread
Help needed with "Intro script" - by HumiliatioN - 07-16-2011, 11:34 PM
RE: Help needed with "Intro script" - by palistov - 07-17-2011, 09:22 AM
RE: Help needed with "Intro script" - by palistov - 07-17-2011, 07:38 PM
RE: Help needed with "Intro script" - by HumiliatioN - 07-17-2011, 07:46 PM



Users browsing this thread: 1 Guest(s)