Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Wake up script
Author Message
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #51
RE: Wake up script

(05-11-2012 01:35 PM)Adrianis Wrote:  No need to fear, it won't take a sec to rewrite it now that you know what is required. Just check the names of the items, comment out your previous lines and write out some new ones
I THINK I fixed it but I don't really know for sure cause I copied the wake up thing from Nepsis and adjusted it to fit my map... unfourtunently.. and ofc... it makes serveral errors:
FATAL ERROR:
main 5,6 Expected (
main 19,6 Expected (
main 61,6 Expected (
main 66,6 Expected ( (Kinda satanic 1... lol)
The script looks like this:
//Run at the start of the game.
void OnGameStart()
{
//Intro
void Intro()
{
SetPlayerActive(false);
SetPlayerCrouching(true);
FadeOut(0);
AddTimer("TIntro0",0,"Intro2");
AddTimer("TIntro4",4,"Intro2");
AddTimer("TIntro6",6,"Intro2");
AddTimer("TIntro9",9,"Intro2");
AddTimer("TIntro10",10,"Intro2");
AddTimer("TIntro15",15,"Intro2");

}

void Intro2(string &in asTimer)
{
if(asTimer == "TIntro0")
{
PlayGuiSound("react_breath_slow",1);
MovePlayerHeadPos(-0.4f,-0.5f,0,50,1);
FadeRadialBlurTo(0.1f,0.1f);
FadeImageTrailTo(0.1f,0.1f);
SetRadialBlurStartDist(0.3f);
StartPlayerLookAt("IntroLook_1", 50, 50, "StopPlayerLookAt");
FadeIn(10);
}
else if(asTimer == "TIntro4")
{
StartPlayerLookAt("note1", 0.5f, 1, "");
StartPlayerLookAt("IntroLook_2", 0.5f, 1, "");
MovePlayerHeadPos(0,0,0,0.3f,1);
PlayGuiSound("react_sigh",1);
}
else if(asTimer == "TIntro6")
{
FadeOut(2);
PlayGuiSound("react_breath_slow",1);
}
else if(asTimer == "TIntro9")
{
FadeRadialBlurTo(0,3);
FadeImageTrailTo(0,3);
FadeIn(0.8f);
}
else if(asTimer == "TIntro10")
{
StartPlayerLookAt("note1", 0.5f, 1, "");
}
else if(asTimer == "TIntro15")
{
StopPlayerLookAt();
SetPlayerActive(true);
SetRadialBlurStartDist(0);
}
}

void StandTimer(string &in asParent, string &in asChild, int alState)
{
AddTimer("StandSleep",0.25f,"Stand");
}

void Stand(string &in asTimer)
{
SetPlayerCrouching(false);
}

05-11-2012 08:45 PM
Find all posts by this user Quote this message in a reply
Adrianis Offline
Senior Member

Posts: 632
Joined: Feb 2012
Reputation: 27
Post: #52
RE: Wake up script

There are a great deal of problems with what you've done there. Know what would work much better? Taking your WakeUp functions, and sticking them in OnStart where appropriate, and using timers to set off delayed actions.
Compared to what this guy did for Nepsis, what you are trying to do is quite simple. I find it a little rude that you would ignore that advice, to be honest. This was obviously necessary for the series of things that the Nepsis developer wanted to happen. For you, it is not necessary, once you get the first set of things that you were trying to do before right (which you can by putting some in OnStart, and others set off in functions by timers), then you can test it and expand, test and expand again until yours looks like this. You won't be able to copy more complicated scripts and adjust them for your game correctly, until you know what the complicated script is doing
05-11-2012 09:15 PM
Find all posts by this user Quote this message in a reply
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #53
RE: Wake up script

(05-11-2012 09:15 PM)Adrianis Wrote:  There are a great deal of problems with what you've done there. Know what would work much better? Taking your WakeUp functions, and sticking them in OnStart where appropriate, and using timers to set off delayed actions.
Compared to what this guy did for Nepsis, what you are trying to do is quite simple. I find it a little rude that you would ignore that advice, to be honest. This was obviously necessary for the series of things that the Nepsis developer wanted to happen. For you, it is not necessary, once you get the first set of things that you were trying to do before right (which you can by putting some in OnStart, and others set off in functions by timers), then you can test it and expand, test and expand again until yours looks like this. You won't be able to copy more complicated scripts and adjust them for your game correctly, until you know what the complicated script is doing
Yea, you know what, screw this wake up shiet, ain't ever gonna work anyway, I tried 3 different expamples none of 'em work, it clearly ain't MEANT to work so.. yea

05-11-2012 10:40 PM
Find all posts by this user Quote this message in a reply
Adrianis Offline
Senior Member

Posts: 632
Joined: Feb 2012
Reputation: 27
Post: #54
RE: Wake up script

Nah, F that, I've spent too long trying to help you for you to give up now.

- Go back to how your script was, like on page 4 of this thread (copy and paste the script from page 4 if you don't have a backup before you added the nepsis stuff)
- Delete the whole of your 'void wakeUp()' function
- paste the lines below into the top of your 'OnStart()' function
- now run it, and see what happens


FadeOut(0);
FadeIn(20);
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(0, 2, 500);
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true);
AddTimer("trig1", 15.0f, "beginStory");
(This post was last modified: 05-11-2012 11:19 PM by Adrianis.)
05-11-2012 11:19 PM
Find all posts by this user Quote this message in a reply
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #55
RE: Wake up script

(05-11-2012 11:19 PM)Adrianis Wrote:  Nah, F that, I've spent too long trying to help you for you to give up now.

- Go back to how your script was, like on page 4 of this thread (copy and paste the script from page 4 if you don't have a backup before you added the nepsis stuff)
- Delete the whole of your 'void wakeUp()' function
- paste the lines below into the top of your 'OnStart()' function
- now run it, and see what happens


FadeOut(0);
FadeIn(20);
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(0, 2, 500);
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true);
AddTimer("trig1", 15.0f, "beginStory");
So uh, nothing is suppose to happen... alright..

05-12-2012 01:03 AM
Find all posts by this user Quote this message in a reply
Adrianis Offline
Senior Member

Posts: 632
Joined: Feb 2012
Reputation: 27
Post: #56
RE: Wake up script

...What do you mean? Did you try it and nothing happened, or did you not try it cause you don't want anything to happen?
05-12-2012 04:08 PM
Find all posts by this user Quote this message in a reply
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #57
RE: Wake up script

(05-12-2012 04:08 PM)Adrianis Wrote:  ...What do you mean? Did you try it and nothing happened, or did you not try it cause you don't want anything to happen?
Haha loooo.... I'm so drunk right now.. just came from a friends 18 year old birthday and stuff.... but yesch, I did try it out and it did not work... as usualll...! Can you do it? cause I can't! I like you... you'r awesome!

05-13-2012 03:28 AM
Find all posts by this user Quote this message in a reply
Rownbear Offline
Member

Posts: 157
Joined: Apr 2011
Reputation: 2
Post: #58
RE: Wake up script

Im calling troll on this guy, been 2 weeks and he still havent found a solution to a wakeup script which alot of CS's got today that he could look at.

05-13-2012 04:35 PM
Find all posts by this user Quote this message in a reply
Saren Offline
Member

Posts: 196
Joined: Jan 2012
Reputation: 1
Post: #59
RE: Wake up script

(05-13-2012 04:35 PM)Rownbear Wrote:  Im calling troll on this guy, been 2 weeks and he still havent found a solution to a wakeup script which alot of CS's got today that he could look at.
Lol if you've read thruough this shit, you would know that I DID try a different stories script and yte that 1 did'nt work either

05-13-2012 08:23 PM
Find all posts by this user Quote this message in a reply
Adrianis Offline
Senior Member

Posts: 632
Joined: Feb 2012
Reputation: 27
Post: #60
RE: Wake up script

(05-13-2012 04:35 PM)Rownbear Wrote:  Im calling troll on this guy, been 2 weeks and he still havent found a solution to a wakeup script which alot of CS's got today that he could look at.
... You got a good point there

Quote: but yesch, I did try it out and it did not work... as usualll...! Can you do it? cause I can't! I like you... you'r awesome!
Frankly, I'm in no position to disagree with your last point. However, you failed to say how it didn't work, so it's difficult to say why. I would do it for you, except that you said you wanted to learn how to script, so I'm not going to. I can help you, but not if you won't take advice

Just for reference,
Quote: I like you... you'r awesome!
Aaaand once more, in case anyone missed it
Quote: I like you... you'r awesome!
Ahhhh Smile
05-13-2012 09:10 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)