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


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 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: #1
Wake up script

Hey guys, I've TRIED to make a wake up script but sadly, no worky, worky, so, if you could tell me what's wrong, that'd be great, might be something simple I dunno... ^^

SetPlayerActive(False);
FadeOut(0);
FadePlayerRollTo(65, 20, 20);
MovePlayerHeadPos (-1, -0.45, -1.1, 29, 1);
AddTimer("activate_player", 3, "FadeIn");
void FadeIn (string &in timer_name)
{
FadeIn(2);
Addtimer("Start", 2, "WakeUp");
}
Void WakeUp (string &in timer_name)
{
if (timer_none == "Start")
{
AddTimer("MoveHead", 1, "WakeUp");
}
else if (timer_name == "MoveHead")
{
MoverPlayerHeadPos(0.5, -0.2, 1.1, 2, 2);
FadePlayerRollTo(0, 1.7, 500);
AddTimer("ActivatePlayer", 2, "WakeUp");
}
else if (timer_name == ActivatePlayer")
{
MovePlayerHeadPos(0, 0, 0, 2, 2);
SetPlayerActive(true)
}

(This post was last modified: 04-30-2012 12:22 PM by Saren.)
04-30-2012 11:44 AM
Find all posts by this user Quote this message in a reply
trollox Offline
Member

Posts: 215
Joined: Dec 2011
Reputation: 3
Post: #2
RE: Wake up script

Well you got 2 { { at

Void WakeUp (string &in timer_name)
{
if (timer_none == "Start")
{



Then again if i'm not wrong timers have their own { so it might not be wrong maybe you're missing one } , sorry if i'm not of much help scripting isn't my best thing xD i'm more of a mapper.
04-30-2012 11:50 AM
Find all posts by this user Quote this message in a reply
Saren Offline
Member

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

(04-30-2012 11:50 AM)trollox Wrote:  Well you got 2 { { at

Void WakeUp (string &in timer_name)
{
if (timer_none == "Start")
{



Then again if i'm not wrong timers have their own { so it might not be wrong maybe you're missing one } , sorry if i'm not of much help scripting isn't my best thing xD i'm more of a mapper.
You and me both bro xD
It is however, correct, I watched this stuff in a video so.... not that xD

(This post was last modified: 04-30-2012 12:22 PM by Saren.)
04-30-2012 12:19 PM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,475
Joined: Jul 2011
Reputation: 235
Post: #4
RE: Wake up script

You have several syntax errors. For starters, it's void not Void. Secondly, it's timer_name not timer_none. Thirdly, you're missing the starting quotation mark for the string ActivatePlayer. I can't comment on anything else because i'm not sure to what point the copy-and-paste of your code has gone to.

Tutorials: From Noob to Pro
04-30-2012 12:27 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Saren Offline
Member

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

(04-30-2012 12:27 PM)Your Computer Wrote:  You have several syntax errors. For starters, it's void not Void. Secondly, it's timer_name not timer_none. Thirdly, you're missing the starting quotation mark for the string ActivatePlayer. I can't comment on anything else because i'm not sure to what point the copy-and-paste of your code has gone to.
.... Maybe I should'nt script when I tired......
Also, fixed those things, still saying the same...
and watchu mean, the script is written not copied xD

(This post was last modified: 04-30-2012 12:34 PM by Saren.)
04-30-2012 12:31 PM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,475
Joined: Jul 2011
Reputation: 235
Post: #6
RE: Wake up script

(04-30-2012 12:31 PM)Saren Wrote:  and watchu mean, the script is written not copied xD

So when you posted the code you wrote it instead of copying it from the editor? <-- That's my point.

Tutorials: From Noob to Pro
(This post was last modified: 04-30-2012 12:38 PM by Your Computer.)
04-30-2012 12:38 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Saren Offline
Member

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

(04-30-2012 12:38 PM)Your Computer Wrote:  
(04-30-2012 12:31 PM)Saren Wrote:  and watchu mean, the script is written not copied xD

So when you posted the code you wrote it instead of copying it from the editor? <-- That's my point.
Oh, you mean here? Yea, I copied all of it, that's the end... well, except the other scripts that work ofc and the void on start and leave... lol

04-30-2012 12:42 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: #8
RE: Wake up script

Void WakeUp (string &in timer_name)
{
if (timer_none == "Start")
{
AddTimer("MoveHead", 1, "WakeUp");
}
else if (timer_name == "MoveHead")
{
MoverPlayerHeadPos(0.5, -0.2, 1.1, 2, 2);
FadePlayerRollTo(0, 1.7, 500);
AddTimer("ActivatePlayer", 2, "WakeUp");
}
else if (timer_name == ActivatePlayer")
{
MovePlayerHeadPos(0, 0, 0, 2, 2);
SetPlayerActive(true)
}

Your missing a '}' at the end. You've closed your final 'else if' but you havn't closed the function. If that still isn't it, then there may be any number of issues with your logic that we can't see. I recommend you add some debugging to find the point at which it's not working, then itll be easier to figure out why
(This post was last modified: 04-30-2012 01:17 PM by Adrianis.)
04-30-2012 01:16 PM
Find all posts by this user Quote this message in a reply
Saren Offline
Member

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

(04-30-2012 01:16 PM)Adrianis Wrote:  Void WakeUp (string &in timer_name)
{
if (timer_none == "Start")
{
AddTimer("MoveHead", 1, "WakeUp");
}
else if (timer_name == "MoveHead")
{
MoverPlayerHeadPos(0.5, -0.2, 1.1, 2, 2);
FadePlayerRollTo(0, 1.7, 500);
AddTimer("ActivatePlayer", 2, "WakeUp");
}
else if (timer_name == ActivatePlayer")
{
MovePlayerHeadPos(0, 0, 0, 2, 2);
SetPlayerActive(true)
}

Your missing a '}' at the end. You've closed your final 'else if' but you havn't closed the function. If that still isn't it, then there may be any number of issues with your logic that we can't see. I recommend you add some debugging to find the point at which it's not working, then itll be easier to figure out why
Alright, thx man, I'll see if I can make this work

(This post was last modified: 04-30-2012 05:15 PM by Saren.)
04-30-2012 05:15 PM
Find all posts by this user Quote this message in a reply
JetlinerX Offline
Senior Member

Posts: 599
Joined: Jun 2011
Reputation: 19
Post: #10
RE: Wake up script

No capital V on "Void"

Its only void.

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

04-30-2012 05:26 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




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