Frictional Games Forum (read-only)

Full Version: Wake up script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8
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)
}
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)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

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)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

(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.
(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
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
(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

No capital V on "Void"

Its only void.
Pages: 1 2 3 4 5 6 7 8