Pages: 1
Topic closed
I'm making a game for my school work called Dr. Awesome vs. The Internet (Don't ask why it's called that). The first level is Google and I want it so when Dr. Awesome touches an enemy the background changes. I've got this far:
<when green flag clicked>
<forever if><touching[ Sprite1 ]?
<switch to costume[ AwesomeDead ]
<end>
Please Help!
Offline
When Flag Clicked
forever
if touching enemy
set variable [dead] to 1
else
set variable [dead] to 0
end forever
{on stage}
When Flag Clicked
forever
if (dead) = 1
switch to background [dead]
else
switch to background [not dead]
Hope it helps!
Offline
Or you could use a broadcast script:
When Flag Clicked
repeat until (touching enemy)
(put script here)
End
broadcast (I'm dead)
For the Stage:
When I receive (I'm dead)
switch to costume (dead)
Offline
I Think This should be On SCRATCH. [blocks]http://scratch.mit.edu/forums/viewtopic.php?id=59420#req_messagehttp://scratch.mit.edu/forums/viewtopic.php?id=59420#req_messagehttp://schttp://scratch.mit.edu/forums/viewtopic.php?id=59420#req_messageratch.mit.edu/forums/viewtopic.php?id=59420#req_messagehttp://scratch.mit.edu/forums/viewtopic.php?id=59420#req_message[/blocks]
Offline
Just do what a couple of people have suggested: use the<broadcast[ and <when I receive[ Blocks.
Offline
Sprite
<when green flag clicked>
<forever if> <touching[ enemy
<broadcast[ touching enemy
<wait until> << <not> <touching[ enemy >>
<end>
Stage
<when I receive[ touching enemy
<next costume>
Last edited by EzekielE (2011-05-25 15:16:59)
Offline
Topic closed
Pages: 1