One of my sprites is causing another one to stop existing
Author |
Message |
undergroundmonorail
|
Posted: Fri Jun 01, 2012 1:33 pm Post subject: One of my sprites is causing another one to stop existing |
|
|
What is it you are trying to achieve?
Make a platformer game with coins
What is the problem you are having?
For some reason, drawing the second coin makes the first one not appear. I've commented out the second coin and the first one comes back.
Describe what you have tried to solve this problem
I have offset the second coin so that it never uses the same image as the first one at the same time.
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Turing: |
if coin1collect = false and levelx = 0 and levely = 0 then
Sprite.Show (coinsprite1 )
if animatedelay = 0 then
Sprite.Animate (coinsprite1, coin1, 400, 250, true)
elsif animatedelay = 26 then
Sprite.Animate (coinsprite1, coin2, 400, 250, true)
elsif animatedelay = 50 then
Sprite.Animate (coinsprite1, coin3, 400, 250, true)
elsif animatedelay = 76 then
Sprite.Animate (coinsprite1, coin4, 400, 250, true)
elsif animatedelay = 100 then
Sprite.Animate (coinsprite1, coin5, 400, 250, true)
elsif animatedelay = 126 then
Sprite.Animate (coinsprite1, coin6, 400, 250, true)
elsif animatedelay = 150 then
Sprite.Animate (coinsprite1, coin7, 400, 250, true)
elsif animatedelay = 176 then
Sprite.Animate (coinsprite1, coin8, 400, 250, true)
elsif animatedelay = 200 then
Sprite.Animate (coinsprite1, coin9, 400, 250, true)
elsif animatedelay = 226 then
Sprite.Animate (coinsprite1, coin8, 400, 250, true)
elsif animatedelay = 250 then
Sprite.Animate (coinsprite1, coin7, 400, 250, true)
elsif animatedelay = 276 then
Sprite.Animate (coinsprite1, coin6, 400, 250, true)
elsif animatedelay = 300 then
Sprite.Animate (coinsprite1, coin5, 400, 250, true)
elsif animatedelay = 326 then
Sprite.Animate (coinsprite1, coin4, 400, 250, true)
elsif animatedelay = 350 then
Sprite.Animate (coinsprite1, coin3, 400, 250, true)
elsif animatedelay = 376 then
Sprite.Animate (coinsprite1, coin2, 400, 250, true)
elsif animatedelay = 400 then
Sprite.Animate (coinsprite1, coin1, 400, 250, true)
elsif animatedelay = 426 then
Sprite.Animate (coinsprite1, coin2, 400, 250, true)
elsif animatedelay = 450 then
Sprite.Animate (coinsprite1, coin3, 400, 250, true)
elsif animatedelay = 476 then
Sprite.Animate (coinsprite1, coin4, 400, 250, true)
elsif animatedelay = 500 then
Sprite.Animate (coinsprite1, coin5, 400, 250, true)
elsif animatedelay = 526 then
Sprite.Animate (coinsprite1, coin6, 400, 250, true)
elsif animatedelay = 550 then
Sprite.Animate (coinsprite1, coin7, 400, 250, true)
elsif animatedelay = 576 then
Sprite.Animate (coinsprite1, coin8, 400, 250, true)
elsif animatedelay = 600 then
Sprite.Animate (coinsprite1, coin9, 400, 250, true)
elsif animatedelay = 626 then
Sprite.Animate (coinsprite1, coin8, 400, 250, true)
elsif animatedelay = 650 then
Sprite.Animate (coinsprite1, coin7, 400, 250, true)
elsif animatedelay = 676 then
Sprite.Animate (coinsprite1, coin6, 400, 250, true)
elsif animatedelay = 700 then
Sprite.Animate (coinsprite1, coin5, 400, 250, true)
elsif animatedelay = 726 then
Sprite.Animate (coinsprite1, coin4, 400, 250, true)
elsif animatedelay = 750 then
Sprite.Animate (coinsprite1, coin3, 400, 250, true)
elsif animatedelay = 776 then
Sprite.Animate (coinsprite1, coin2, 400, 250, true)
end if
else
Sprite.Hide (coinsprite1 )
end if
if coin2collect = false and levelx = 0 and levely = 0 then
Sprite.Show (coinsprite2 )
if animatedelay = 0 then
Sprite.Animate (coinsprite2, coin1, 600, 250, true)
elsif animatedelay = 26 then
Sprite.Animate (coinsprite2, coin2, 600, 250, true)
elsif animatedelay = 50 then
Sprite.Animate (coinsprite2, coin3, 600, 250, true)
elsif animatedelay = 76 then
Sprite.Animate (coinsprite2, coin4, 600, 250, true)
elsif animatedelay = 100 then
Sprite.Animate (coinsprite2, coin5, 600, 250, true)
elsif animatedelay = 126 then
Sprite.Animate (coinsprite2, coin6, 600, 250, true)
elsif animatedelay = 150 then
Sprite.Animate (coinsprite2, coin7, 600, 250, true)
elsif animatedelay = 176 then
Sprite.Animate (coinsprite2, coin8, 600, 250, true)
elsif animatedelay = 200 then
Sprite.Animate (coinsprite2, coin9, 600, 250, true)
elsif animatedelay = 226 then
Sprite.Animate (coinsprite2, coin8, 600, 250, true)
elsif animatedelay = 250 then
Sprite.Animate (coinsprite2, coin7, 600, 250, true)
elsif animatedelay = 276 then
Sprite.Animate (coinsprite2, coin6, 600, 250, true)
elsif animatedelay = 300 then
Sprite.Animate (coinsprite2, coin5, 600, 250, true)
elsif animatedelay = 326 then
Sprite.Animate (coinsprite2, coin4, 600, 250, true)
elsif animatedelay = 350 then
Sprite.Animate (coinsprite2, coin3, 600, 250, true)
elsif animatedelay = 376 then
Sprite.Animate (coinsprite2, coin2, 600, 250, true)
elsif animatedelay = 400 then
Sprite.Animate (coinsprite2, coin1, 600, 250, true)
elsif animatedelay = 426 then
Sprite.Animate (coinsprite2, coin2, 600, 250, true)
elsif animatedelay = 450 then
Sprite.Animate (coinsprite2, coin3, 600, 250, true)
elsif animatedelay = 476 then
Sprite.Animate (coinsprite2, coin4, 600, 250, true)
elsif animatedelay = 500 then
Sprite.Animate (coinsprite2, coin5, 600, 250, true)
elsif animatedelay = 526 then
Sprite.Animate (coinsprite2, coin6, 600, 250, true)
elsif animatedelay = 550 then
Sprite.Animate (coinsprite2, coin7, 600, 250, true)
elsif animatedelay = 576 then
Sprite.Animate (coinsprite2, coin8, 600, 250, true)
elsif animatedelay = 600 then
Sprite.Animate (coinsprite2, coin9, 600, 250, true)
elsif animatedelay = 626 then
Sprite.Animate (coinsprite2, coin8, 600, 250, true)
elsif animatedelay = 650 then
Sprite.Animate (coinsprite2, coin7, 600, 250, true)
elsif animatedelay = 676 then
Sprite.Animate (coinsprite2, coin6, 600, 250, true)
elsif animatedelay = 700 then
Sprite.Animate (coinsprite2, coin5, 600, 250, true)
elsif animatedelay = 726 then
Sprite.Animate (coinsprite2, coin4, 600, 250, true)
elsif animatedelay = 750 then
Sprite.Animate (coinsprite2, coin3, 600, 250, true)
elsif animatedelay = 776 then
Sprite.Animate (coinsprite2, coin2, 600, 250, true)
end if
else
Sprite.Hide (coinsprite2 )
end if
|
Please specify what version of Turing you are using
OpenTuring 1.0.1 (Based on Turing 4.1) |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Aange10
|
Posted: Fri Jun 01, 2012 1:39 pm Post subject: RE:One of my sprites is causing another one to stop existing |
|
|
If coin1Collect & coin2Collect are both true, that I'm not sure what your problem is. If coin1Collect is false and coin2Collect is true, then you're problem is that you're telling it to hide the first sprite.
However it's worth noting that the sprite module is incomplete. |
|
|
|
|
|
|
|