Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Problem with DeleteSprite

Author
Message
djeronimo
13
Years of Service
User Offline
Joined: 2nd May 2011
Location: Sarajevo
Posted: 26th Mar 2012 23:20
Hello guys,

I have just bought AppGameKit and immediately start play like a kid . But I'm now confronted with strange problem (strange just for me of course ).

I'm trying to delete sprite after collision. But I'm making some mistake and can't figure out what .

So here is a code:



Could someone be so kind to give me few directions?

Regards.

@djeronimo.com
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Mar 2012 00:07
First, you need to indicate that physics should be applied to the sprites:


Next, you want to check that sprite 3 still exists before checking for collision


Otherwise you will have a crash on the sync cycle after the collision.

Cheers,
Ancient Lady
djeronimo
13
Years of Service
User Offline
Joined: 2nd May 2011
Location: Sarajevo
Posted: 27th Mar 2012 00:17
Oooooo thank you my Lady . Thank you very much. It works now and now I understand where I made mistake.

Regards



@djeronimo.com
swissolo
14
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 27th Mar 2012 00:24
You've been quite a help to everyone Ancient Lady, I'll mark that in my crash thread.

swis
Joined: Tue Dec 16th 2008
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Mar 2012 15:14
I'm happy to help.

I've been programming a long time and helping others learn or fix is part of my core being.

I'm not the most patient of people (just ask my daughter), but I will always try.

I'm making good progress with my own game and happily testing in the PC, Android and Mac world. I was testing a new feature in the game and by accident set it up to be almost impossible to get past the obstacles. And was laughing hysterically as my poor player kept getting bounced off all the walls.

Programming is fun!

Happy programming to all and to all a good game!

Cheers,
Ancient Lady

Login to post a reply

Server time is: 2024-05-02 13:33:50
Your offset time is: 2024-05-02 13:33:50