Pages: 1
Topic closed
Let's see, you could use a new block (most likely, you don't know squeak, so scratch that)
Or you can use this script
[Blocks]
<hide>
<set{ hidden? }to( 1
[/blocks]
and
[blocks]
<show>
<set{ hidden? }to( 0
[/blocks]
When you want it to hide, you just use the first script, and when not hidden, use the second script.
Last edited by owetre18 (2011-07-24 12:20:37)
Offline
owetre18 wrote:
Let's see, you could use a new block (most likely, you don't know squeak, so scratch that)
Or you can use this script
[blocks]
<hide>
<set{ hidden? }to( 1
[/blocks]
and
[blocks]
<show>
<set{ hidden? }to( 0
[/blocks]
When you want it to hide, you just use the first script, and when not hidden, use the second script.
Also, you want each sprite to have the "hidden?" variable, and make sure it's personal variable.
Offline
DigiTechs wrote:
scimonster, it wouldnt work if its a personal variable. You need variables like hidden1, hidden2 and so on.
Not true.
You can read a sprite's personal variables using a sensing block:
([x position] of [Sprite1])
Under "x position", there is listed any private variables for that sprite.
Last edited by BoltBait (2011-07-25 12:33:07)
Offline
Another problem is that, When I want it to hide forever, It wont. I press the spacebar to close each menu like 'Help' or 'Credits', But when I press space during the game, the two buttons just flashes rapidly. Any help on how to stop this?
Offline
Blooker wrote:
Another problem is that, When I want it to hide forever, It wont. I press the spacebar to close each menu like 'Help' or 'Credits', But when I press space during the game, the two buttons just flashes rapidly. Any help on how to stop this?
It sounds like you need another variable that indicates that your game is running (perhaps you already have one). In the script that the space key runs (or the script that checks for space key pressed), you'd add
If "GameRunning = 0" then
do costume stuff
If the GameRunning variable is "1", the costume changes wouldn't happen.
I usually use a boolean like this to enable "forever if" scripts. This makes it easy to stop a script under certain conditions by just changing a varible.
Offline
Fixed
Hope that helps ^^
Offline
BoltBait wrote:
DigiTechs wrote:
scimonster, it wouldnt work if its a personal variable. You need variables like hidden1, hidden2 and so on.
Not true.
You can read a sprite's personal variables using a sensing block:
([x position] of [Sprite1])
Under "x position", there is listed any private variables for that sprite.
O: never known that.
Offline
DigiTechs wrote:
BoltBait wrote:
DigiTechs wrote:
scimonster, it wouldnt work if its a personal variable. You need variables like hidden1, hidden2 and so on.
Not true.
You can read a sprite's personal variables using a sensing block:
([x position] of [Sprite1])
Under "x position", there is listed any private variables for that sprite.O: never known that.
Me neither, thanks for the tip
Offline
Topic closed
Pages: 1