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 hit comm ??? and if statemant

Author
Message
sadsack
22
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 13th Mar 2006 22:23
Well what I have is a spaceship making a landing. What i want to happen in if the speed is over -4 you are dead. this is a if statement
if the speed is less than-4 you have landed. should be easy Just don't know what I am doing wrong. here the code:

if sprite hit (1,2)
if velocity >=-4
text 500,500, "you are dead!"
velocity = 0
else
if velocity <=-4
text 500,500, "you have landed"
velocity = 0
endif
endif
endif
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 13th Mar 2006 23:55 Edited at: 13th Mar 2006 23:56
Maybe you have them backwards...

try them

<=

>=

Anyway, do you have a sprite on the ground in the first place?

sadsack
22
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 15th Mar 2006 04:38
Thank you, But I got it working, not the way I first planed it but it works well so that is good.
renny

Login to post a reply

Server time is: 2026-07-01 21:22:25
Your offset time is: 2026-07-01 21:22:25