The problem is thus:
I have a background sprite which, when touch by the player's one, broadcasts a message. when the message is received, a sprite (a dialogue box for storyline) appears. The problem is, there are indefinite times which the player sprite may touch the background sprite, depending on the player's own decision and control. However, I only want the storyline box to appear on the first time the message is received. Is there a way to do this?
If not, the dialogue box appears all over again, which disrupts the storyline and annoys the player.
Thanks very much. I am really stuck at the moment. Any advise is appreciated
Offline
lestrade3333 wrote:
The problem is thus:
I have a background sprite which, when touch by the player's one, broadcasts a message. when the message is received, a sprite (a dialogue box for storyline) appears. The problem is, there are indefinite times which the player sprite may touch the background sprite, depending on the player's own decision and control. However, I only want the storyline box to appear on the first time the message is received. Is there a way to do this?
If not, the dialogue box appears all over again, which disrupts the storyline and annoys the player.
Thanks very much. I am really stuck at the moment. Any advise is appreciated
Have you tried hiding (purple Looks toolbox) right before it goes away the first time it appears? This should keep it from being visible later even if it does appear.
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free Scratch tutorials: http://www.dickbaldwin.com/tocHomeSchool.htm
Free Java/C#, etc. tutorials: http://www.dickbaldwin.com/toc.htm
Offline
You might be able to fix it this way:
Instead of using a broadcast, you could use a varibiable.
Where the broadcast is sent, replace the broadcast block with "set storyline to 1". If you need another storyline-message, place "set storyline to 2"
Now use this script in the dialog box:
When green flag clicked set storyline to 0 hide wait until storyline = 1 show switch to costume message1 wait until key space pressed ==>you can replace this by any "pausing" block: wait, wait until hide wait until storyline = 2 show switch to costume message2 wait until key space pressed ==> same here, of course hide
You can implement as much storyline dialog boxes as you want aith this method, just create a costume for each box.
Does this helped?
Joren
Last edited by JSO (2008-05-21 09:24:57)
Offline
lestrade3333 wrote:
The problem is thus:
I have a background sprite which, when touch by the player's one, broadcasts a message. when the message is received, a sprite (a dialogue box for storyline) appears. The problem is, there are indefinite times which the player sprite may touch the background sprite, depending on the player's own decision and control. However, I only want the storyline box to appear on the first time the message is received. Is there a way to do this?
If not, the dialogue box appears all over again, which disrupts the storyline and annoys the player.
Thanks very much. I am really stuck at the moment. Any advise is appreciated
Try using "stop script"
Offline