I need help with my project. is there a way of saying...
if <touching (sprite 1)>glide to bla bla bla
is this possible with out pressing a button. i need this because i want to make a pac-man with ghosts so if pac-man touches a ghost (or vica verca) he goes to some where? is this possible?
Offline
Yes
<when green flag clicked>
<if><touching[ ghost]
<glide( x )secs to x x )y y)
Offline
but the ghosts are set a corse and follow it doesn't the flag mean a button is pressed?
Offline
demosthenes wrote:
Yes
<when green flag clicked>
<if><touching[ ghost]
<glide( x )secs to x x )y y)
You need a forever block around the if block.
Offline
well u could have a broadcast and recieve block without a block being pressed
Offline
Just do
<when green flag clicked>
<forever>
<if><touching[ ghost
<glide( # )secs to x # )y #
<end>
<end>[/blocks]
And about your question:
CDromatron wrote:
but the ghosts are set a corse and follow it doesn't the flag mean a button is pressed?
The green flag is sort of a button, but it's the one people will automatically think starts the game. (when you play it online, it automatically gets pressed as soon as it loads.) So I'd recommend starting most of your scripts with it.
Offline
hmnwilson wrote:
Just do
<when green flag clicked>
<forever>
<if><touching[ ghost
<glide( # )secs to x # )y #
<end>
<end>[/blocks]
And about your question:CDromatron wrote:
but the ghosts are set a corse and follow it doesn't the flag mean a button is pressed?
The green flag is sort of a button, but it's the one people will automatically think starts the game. (when you play it online, it automatically gets pressed as soon as it loads.) So I'd recommend starting most of your scripts with it.
Most...if not all
The rest should be started with
<when I receive[
Last edited by bhz (2009-03-08 07:50:06)
Offline
ok thanks to all that helped
Offline
bhz wrote:
hmnwilson wrote:
Just do
<when green flag clicked>
<forever>
<if><touching[ ghost
<glide( # )secs to x # )y #
<end>
<end>[/blocks]
And about your question:CDromatron wrote:
but the ghosts are set a corse and follow it doesn't the flag mean a button is pressed?
The green flag is sort of a button, but it's the one people will automatically think starts the game. (when you play it online, it automatically gets pressed as soon as it loads.) So I'd recommend starting most of your scripts with it.
Most...if not all
The rest should be started with
<when I receive[
Yes that is what I recommended
Offline
hmnwilson wrote:
Just do
<when green flag clicked>
<forever>
<if><touching[ ghost
<glide( # )secs to x # )y #
<end>
<end>[/blocks]
I think it could work out better as
[blocks]<when green flag clicked>
<forever>
<wait until><< <touching[ ghost1 <or> <touching[ ghost2 >> ...etc
<glide( # )secs to x ### )y ###
<end>[/blocks]
Offline