Can someone help me out with this script, I have no clue what is wrong. I am honestly no good at this and keep getting something wrong please help if you can!
Quote: ////////////////////////////
// Run when entering map
void OnEnter(){
void wakeUp ()
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
When I quickly watch this I can tell you should remove: "void wakeUp ()", and then put "}" after this line: "AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last".
There are lots of problems I can point out.Never put one function inside another or you will get tons of errors. So, it should be organized like this:
void OnEnter()
{
stuff
}
void beginStory(string &in asTimer)
{
stuff
}
Like JMFStorm said, get rid of "void wakeup ()", it serves no purpose.
Make sure every function has its own open and close bracket.
Make sure every number with a decimal is followed by "f": e.g. "10.0f".
I recommend that you don't use this script for the beginning, watch some Youtube tutorials, or read some beginner tutorials on the wiki, then when you get the scripts. Use this one.
I need some help here if anyone can take a look at this script and tell me what is wrong, I keep getting an error on line 38,56 and don't know what's wrong.
Spoiler below!
////////////////////////////
// Run when entering map
Void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "SetEntityActive", true, 1);
}
void OnEnter(){
FadeOut(20); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 8.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}
I mean, what were you even trying to do here? Change an already existing function and then just add some additional parameters because they looked nice?
I mean, what were you even trying to do here? Change an already existing function and then just add some additional parameters because they looked nice?
Understand what you're doing. That's my solution.
"Understand what you're doing. That's my solution."
Well I ask for help to get a better understanding of what I am doing.
I mean, what were you even trying to do here? Change an already existing function and then just add some additional parameters because they looked nice?
Understand what you're doing. That's my solution.
"Understand what you're doing. That's my solution."
Well I ask for help to get a better understanding of what I am doing.
must have gotten jumbled up with something else when I was deleting something else. And I think it looks very nice! Thank you for thinking so too!
You don't just ask for help every time your code somehow doesn't work.
Begin from the beginning: Learn to script with the aid of manuals and tutorials.
Here's an online tutorial: From Noob to Pro
I mean, what were you even trying to do here? Change an already existing function and then just add some additional parameters because they looked nice?
Understand what you're doing. That's my solution.
"Understand what you're doing. That's my solution."
Well I ask for help to get a better understanding of what I am doing.
must have gotten jumbled up with something else when I was deleting something else. And I think it looks very nice! Thank you for thinking so too!
You don't just ask for help every time your code somehow doesn't work.
Begin from the beginning: Learn to script with the aid of manuals and tutorials.
Here's an online tutorial: From Noob to Pro
But of course I ask when I need help. You can choose not to help.