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 Wake up script
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#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
trollox Offline
Member

Posts: 215
Threads: 16
Joined: Dec 2011
Reputation: 3
#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
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#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
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#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
Website Find
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#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
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#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
Website Find
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#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
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#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
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#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
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#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
Website Find




Users browsing this thread: 1 Guest(s)