|
Post by kas29 on Apr 13, 2013 7:10:15 GMT
Hi all!!! Need an explosion, collision.. Tell me, what am I doing wrong? Not happening explosion... ... If deadly let image=4 animate kill endif ...
if not to kill, the explosion happens and if you kill, then immediately die a hero, and explosion no
|
|
|
Post by nra on Apr 14, 2013 0:47:00 GMT
Kas, I think it would be simple to remove the sprite and put there a corresponding explosion sprite -- or just change its type when required.
The point is your sprite changes the sprite, changes the frame once, and got killed then; not the best sequence ever.
|
|
|
Post by kas29 on Apr 14, 2013 4:24:39 GMT
Thanks for the tip nra. This is the time it works, but how to do that after the explosion, the hero appeared with the starting position... here's some code.. rghost.ru/45274176
|
|
|
Post by nra on Apr 14, 2013 10:01:06 GMT
Kas, preserve the start coords and when changing the TYPE just set some time-to-live variable, say, M to desired timeout and in EXPLOSION type check if M>0 ANIMATE SUBTRACT 1 TO M ELSE LET TYPE 0 //LET IMAGE 0 //LET FRAME 0 LET X A LET Y B ENDIF Actually, it's but a countdown (TTL) code. Although I cannot check it atm, but it should work ok.
|
|
|
Post by kas29 on Apr 15, 2013 16:21:11 GMT
Thanks for the idea nra!
|
|