[scratchblocks]
when space clicked
ask [Where do you want to go shopping? select a number 1-3]
set number to answer
if number=1
switch to background 1
if number=2
switch to background 2
if number=3
switch to background 3
I'm trying to allow the script to say, You've arrived at the location for background 1,2, or 3!
Depending on which answer the user selects.
So how do you SAY something WHEN THE BACKGROUND changes?
Any help would be great!
Offline
lyates93 wrote:
when [space v] key pressed ask [Where do you want to go shopping? Select a number 1-3] and wait set [number v] to (answer) if <(number)=(1)> switch to background [background 1 v] broadcast [loc1 v] end if <(number)=(2)> switch to background [background 2 v] broadcast [loc2 v] end if <(number)=(3)> switch to background [background 3 v] broadcast [loc3 v]And now for a sprite's script...when i receive [loc1 v] say [You've arrived at location 1!] when i receive [loc2 v] say [You've arrived at location 2!] when i receive [loc3 v] say [You've arrived at location 3!]I'm trying to allow the script to say, You've arrived at the location for background 1,2, or 3!
Depending on which answer the user selects.
So how do you SAY something WHEN THE BACKGROUND changes?
Any help would be great!
Fixed and edited so it can say that. Use the edited script above.
EDIT: Now does it work? Tell me if anything's wrong!
Last edited by awesomeness321 (2012-10-12 21:54:01)
Offline
If I put the the first message in the sprite script it doesn't allow me to use "switch to background" and then when I put the message into the background script it doesn't like me use the "say function". The purple functions aren't universal, how do you fix this?
Offline
lyates93 wrote:
If I put the the first message in the sprite script it doesn't allow me to use "switch to background" and then when I put the message into the background script it doesn't like me use the "say function". The purple functions aren't universal, how do you fix this?
Hmmm... I'll edit my post and see if it's better, wait a minute....
Edited it! Now does it work?
Last edited by awesomeness321 (2012-10-12 21:54:25)
Offline