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.

2D All the way! / sprite exist command

Author
Message
sadsack
22
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 16th Jul 2006 19:02
I don't know how to use this comm. I try something like this:

if sprite exist 3 then something

but that would not work.
I have a sprite that is in the do loop and I want to delete it in the game. But when this sprite 3 is deleted it stop the loop next time around with (line so and so sprite does not exest)
so if some one can help me that would be nice.
Thank You
renny
m2zt
20
Years of Service
User Offline
Joined: 12th Nov 2005
Location:
Posted: 16th Jul 2006 19:38 Edited at: 16th Jul 2006 22:54
x = 100
do
If sprite exist(1) and x > 400 then
delete sprite 1

If sprite exist (1)
inc x,5
sprite 1,x,300,1
endif

sync
loop


So you have to check if the sprite exist for everytime you call that sprite. Hope that helps you out.

Futurama 2008

Login to post a reply

Server time is: 2026-07-05 23:07:29
Your offset time is: 2026-07-05 23:07:29