I currently working on a project that has an intro (Timed changes in backrounds and sprites showing and dissapearing) and then the acual game. I wanted to add a skip button for those who dont want to rewatch the intro whenever they play the game. I'm not really sure what a good scrip for this would be. I was trying a few things but it didnt work out.
Offline
Make the button come at the beginning so the user has a choice whether to skip or not. Then make a variable "skip" yes or no. If skip is no, then the sprites do the intros. If skip is yes, it skips directly to the game. Hope this helps!
Offline
First make your intro start by means of broadcast (have a message called "Intro" which starts all the intro things [if it starts immediately have a "When Green Flag Clicked broadcast Intro".])
Next put an if over all of the intro's scripts like "if Skip? = 0" (Make a variable called Skip?)
(Set Skip? to 0 at the start of the project)
Next, your skip button should say When Skip Button Pressed Set Skip? to 1, then broadcast intro again. Now because Skip? is equal to 1 and not 0 it will skip all of the introduction sequences and move right into the game.
Offline
Kileymeister wrote:
First make your intro start by means of broadcast (have a message called "Intro" which starts all the intro things [if it starts immediately have a "When Green Flag Clicked broadcast Intro".])
Next put an if over all of the intro's scripts like "if Skip? = 0" (Make a variable called Skip?)
(Set Skip? to 0 at the start of the project)
Next, your skip button should say When Skip Button Pressed Set Skip? to 1, then broadcast intro again. Now because Skip? is equal to 1 and not 0 it will skip all of the introduction sequences and move right into the game.
Thanks for the help! I makes sense and everthing but for some reason it's not working. I think I made my scripting much more complicated than its suposed to be.
Like an example of one of my scripts is:
[blocks]
<when green flag clicked>
<set{script} to( 0
<broadcast[intro
<if>
<(script<=>0)>
<repeat( 10
<switch to background[ 1
<switch to bacground[ 2
<wait( 1 )secsc>
<switch to backgound[ 3
<broadcast[ first year
<wait( 2
<switch to background[ 4
<wait ( 4 )secsc>
<broadcast[ 2nd year
[/blocks]
Then the brodcasts would affect orther sprites and other scriptings.
Offline