I am confused. I am making a mario game and I made it so that when he touches a color, his life counter goes down and he reappears at a certain point. I used broadcasting, but now he can't move from that spot. How do I stop the script from repeating itself? I've tried to use the Stop Script block, but it doesn't work.
Here is the way I have it set up.
[blocks]<when I receive[ firstdeath ]>
<go to x -45)y: (-80)>[/blocks]
then I have four blocks that say if colors on my sensor for mario touch that color, set the variable that triggers the life counter to 1.
I've tried this:
[blocks]<when I receive[ firstdeath ]>
<repeat(1)>
<go to x -45) y: (-80)>
<stop script>
<end>
And then the sensor stuff. Could someone please help me?
Last edited by GlitchSprite (2010-06-21 12:04:49)
Offline
where realdie is the variable that triggers the life counter.
I think you have to save the picture to see it.
Last edited by GlitchSprite (2010-06-21 12:45:09)
Offline
meew0 wrote:
That image does not exist... ?
Arg!!!
I'll just make it with blocks...
[blocks]<if><color[ black ]is over[ light blue ]
<set{ realdie }to( 2 )
<if><color[ red ]is over[ light blue ]
<set{ realdie }to( 2 )
<if><color[ orange ]is over[ light blue ]
<set{ realdie }to( 2 )
<if><color[ yellow ]is over[ light blue ]
<set{ realdie }to( 2 )
<end>
Last edited by GlitchSprite (2010-06-21 13:08:43)
Offline
I get that error:
404 - Not Found
The page you are trying to access does not exist.
If this error persists, please contact the website webmaster.
If you are the webmaster of this site make sure that:
* You have uploaded correctly your files to the public_html directory which is the web-root of your account;
* You have not misspelled the URL. Bear in mind that letters are case sensitive and no blank spaces are recommended;
* In case you have applied SEO - SEF URL rewrite rules, make sure you have renamed the htaccess.txt file to .htaccess. If there is already a non-empty .htaccess file, check it and make sure the necessary rules are uncommented.
Offline
From the looks of it, the most likely problem is firstdeath is being broadcasted over and over for some reason. You didn't post the broadcasting script so I don't know exactly how it works, but first try putting this after firstdeath is broadcasted:
<wait until><not> (whatever triggers the broadcasting script) >>[/blocks]
This should keep it from broadcasting more than once.
Last edited by hmnwilson (2010-06-21 14:04:13)
Offline
Set the variable back to normal after broadcasting the message.
Offline