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! / how can i make the missile launch by just making the ship pass over it??

Author
Message
PowerMan
20
Years of Service
User Offline
Joined: 22nd Jan 2005
Location: Manchester
Posted: 12th May 2005 17:29
I am making an arcade game and i want to make it so that when the space craft goes above the missile it will launch. At the moment i have a marker that when the ship colides with it the missile launches.

but i dont want any markers just a detection that the SHIP IS ABOVE THE MISSILE

here is my code and project
http://homepage.ntlworld.com/j.power40/html/missile.zip
dj chainz
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location: England
Posted: 13th May 2005 05:21 Edited at: 13th May 2005 05:27
its so simple:
if ship.x>=missile.x1 and ship.x<=missile.x2 and ship.y<missile.y then launchmissile()

wise word for the day : figuring out a problem without help will teach you more in the long run

I am the lead programmer at red spark studios
http://www.brazilianhotties.tk
PowerMan
20
Years of Service
User Offline
Joined: 22nd Jan 2005
Location: Manchester
Posted: 13th May 2005 05:33
Thanks DJ but how would i fit that into my code?

dj chainz
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location: England
Posted: 13th May 2005 05:39
heed my wise words

I am the lead programmer at red spark studios
http://www.brazilianhotties.tk
PowerMan
20
Years of Service
User Offline
Joined: 22nd Jan 2005
Location: Manchester
Posted: 13th May 2005 05:47
when i put them in my code it does not work can you show me where i should place the code
PowerMan
20
Years of Service
User Offline
Joined: 22nd Jan 2005
Location: Manchester
Posted: 13th May 2005 06:38


Where am i going wrong here?
dj chainz
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location: England
Posted: 14th May 2005 07:46
perhaps the
Quote: "REM <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"

lines arent too helpful

other helpful things:
dont use a paste sprite thingy, just use a normal sprite for the missile, or a paste image
spell MISSILE correctly throughout your code
use types (DBPro only):


I am the lead programmer at red spark studios
http://www.brazilianhotties.tk
NanoBrain
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 22nd May 2005 12:12 Edited at: 22nd May 2005 14:37
dj chainz,

About pasting the sprite, it is faster than using the sprite command itself. The sprite command is accually rather slow compared to paste sprite. I prefer to use paste sprite when I am not needing to change the sprite image. Elsewise, I use the sprite command.

PowerMan,

Are you using DB Classic or DB Pro?


+NanoBrain+

Login to post a reply

Server time is: 2025-05-17 09:42:54
Your offset time is: 2025-05-17 09:42:54