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.

Dark GDK / How to stop Sprites from moving

Author
Message
Cooldude
16
Years of Service
User Offline
Joined: 10th Nov 2007
Location:
Posted: 26th Nov 2007 23:44
I just wrote some code that makes the little, crappy, space ship move when you press the left and right keys. I have two walls. Why won't this code make my space ship stop moving???

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Nov 2007 23:58
This bit:
ShipX = Wall1X

... assigns the value of Wall1X to ShipX. If you want to compare, then you need to use double-equals (==)

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 27th Nov 2007 00:08
It should be also noted that adding/subtracting zero does nothing.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Cooldude
16
Years of Service
User Offline
Joined: 10th Nov 2007
Location:
Posted: 27th Nov 2007 00:50 Edited at: 27th Nov 2007 03:32
Can someone give me some code?? This is my first game and I really hardly know anything. I am making a space scrolling shooter. What I want it to do is if my ship collides with a wall then my ship stops. Can you maybe give some code???

Here's All My Code:
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 27th Nov 2007 15:24
If you ship collides with a wall then it should explode?

Control if you ship hit the wall.
If it does then
- dont listing for use input
- hide ship
- show explotion

And now go back to start with a new ship or "GAME OVER"

Niels Henriksen
Working on a (MMO)RPG right now in LightEngine
http://noggs.netopcom.dk/forum/default.asp - Forum for the game
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 27th Nov 2007 15:25
Cooldude - if you hardly know anything then dont think in code. Write anything down. If you have it in a document then sent it to me and I will help you with that part

Niels Henriksen
Working on a (MMO)RPG right now in LightEngine
http://noggs.netopcom.dk/forum/default.asp - Forum for the game
Cooldude
16
Years of Service
User Offline
Joined: 10th Nov 2007
Location:
Posted: 27th Nov 2007 16:17

I don't get what you want me to do.

Login to post a reply

Server time is: 2024-09-29 05:31:22
Your offset time is: 2024-09-29 05:31:22