Pages: 1
As you can see below in the forever and repeat loop, the forever is forever spawning and pointing towards sprite 1 and repeat is only supposed to deal with movement. The problem is once the bird is hit with a fireball, it goes back to its original location and continues to move and go towards sprite 1 while hidden, thus making it impossible to respawn. How can i stop this and make it hold position once it is hit?
when gf clicked
forever if <touching fireball>
play sound
change <Bird> by (1)
when i receive <start>
hide
go to x:(195) y:(126)
forever
wait <pick random(1) to (1)> secs
play sound
go to x:(195) y:(126)
show
repeat until <touching sprite1>
wait (0.5) secs
point towards <sprite1>
move (30) steps
when gf clicked
hide
forever if <touching fireball>
wait(0.5) secs
go to x:(195) y:(126)
hide
Offline
bump
Offline
Fernandop91 wrote:
As you can see below in the forever and repeat loop, the forever is forever spawning and pointing towards sprite 1 and repeat is only supposed to deal with movement. The problem is once the bird is hit with a fireball, it goes back to its original location and continues to move and go towards sprite 1 while hidden, thus making it impossible to respawn. How can i stop this and make it hold position once it is hit?
when gf clicked forever if <touching [fireball v]?> play sound change [Bird v] by (1) when i receive [start v] hide go to x:(195) y:(126) forever wait<pick random(1)to(1)>secs//You do know that this is the same as 1? play sound go to x:(195) y:(126) show repeat until <touching [sprite1 v]?> wait (0.5) secs point towards [sprite1 v] move (30) steps end wait until (ready?)//The added block. when gf clicked hide forever if (touching [fireball v]?) wait (0.5) secs go to x:(195) y:(126) hide
I fixed your script and added a block that might fix your problem.
Last edited by ErnieParke (2012-11-05 15:29:45)
Offline
ErnieParke wrote:
Fernandop91 wrote:
As you can see below in the forever and repeat loop, the forever is forever spawning and pointing towards sprite 1 and repeat is only supposed to deal with movement. The problem is once the bird is hit with a fireball, it goes back to its original location and continues to move and go towards sprite 1 while hidden, thus making it impossible to respawn. How can i stop this and make it hold position once it is hit?
when gf clicked forever if <touching [fireball v]?> play sound change [Bird v] by (1) when i receive [start v] hide go to x:(195) y:(126) forever wait<pick random(1)to(1)>secs//You do know that this is the same as 1? play sound go to x:(195) y:(126) show repeat until <touching [sprite1 v]?> wait (0.5) secs point towards [sprite1 v] move (30) steps end wait until (ready?)//The added block. when gf clicked hide forever if (touching [fireball v]?) wait (0.5) secs go to x:(195) y:(126) hideI fixed your script and added a block that might fix your problem.
Is ready a new variable? I know the 1 to 1 was just to test it out, The problem is the bird goes back to the spot but it doesn't go out of the loop.
Offline
Fernandop91 wrote:
ErnieParke wrote:
Fernandop91 wrote:
As you can see below in the forever and repeat loop, the forever is forever spawning and pointing towards sprite 1 and repeat is only supposed to deal with movement. The problem is once the bird is hit with a fireball, it goes back to its original location and continues to move and go towards sprite 1 while hidden, thus making it impossible to respawn. How can i stop this and make it hold position once it is hit?
when gf clicked forever if <touching [fireball v]?> play sound change [Bird v] by (1) when i receive [start v] hide go to x:(195) y:(126) forever wait<pick random(1)to(1)>secs//You do know that this is the same as 1? play sound go to x:(195) y:(126) show repeat until <touching [sprite1 v]?> wait (0.5) secs point towards [sprite1 v] move (30) steps end wait until (ready?)//The added block. when gf clicked hide forever if (touching [fireball v]?) wait (0.5) secs go to x:(195) y:(126) hideI fixed your script and added a block that might fix your problem.
Is ready a new variable? I know the 1 to 1 was just to test it out, The problem is the bird goes back to the spot but it doesn't go out of the loop.
ready is a new variable, but then you need something setting ready to when you want the bird to appear. Maybe you could repeat until touching your sprite instead of forever? would that work?
Offline
No, it's not a new variable; it's just what you would use to detect when the bird should appear again.
Last edited by ErnieParke (2012-11-05 16:04:54)
Offline
I solved my problem, its a noobie fix but i just added like 8 more bird spawns and make them wait 10-70 seconds.
Offline
Pages: 1