Saren
Member
Posts: 196
Threads: 20
Joined: Jan 2012
Reputation:
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 |
|
trollox
Member
Posts: 215
Threads: 16
Joined: Dec 2011
Reputation:
3
|
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 |
|
Saren
Member
Posts: 196
Threads: 20
Joined: Jan 2012
Reputation:
1
|
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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
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.
|
|
04-30-2012, 12:27 PM |
|
Saren
Member
Posts: 196
Threads: 20
Joined: Jan 2012
Reputation:
1
|
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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
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.
(This post was last modified: 04-30-2012, 12:38 PM by Your Computer.)
|
|
04-30-2012, 12:38 PM |
|
Saren
Member
Posts: 196
Threads: 20
Joined: Jan 2012
Reputation:
1
|
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 |
|
Adrianis
Senior Member
Posts: 620
Threads: 6
Joined: Feb 2012
Reputation:
27
|
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 |
|
Saren
Member
Posts: 196
Threads: 20
Joined: Jan 2012
Reputation:
1
|
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 |
|
JetlinerX
Senior Member
Posts: 599
Threads: 49
Joined: Jun 2011
Reputation:
19
|
RE: Wake up script
No capital V on "Void"
Its only void.
|
|
04-30-2012, 05:26 PM |
|
|