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.

Newcomers DBPro Corner / 2D shooting problem

Author
Message
hot_coder
20
Years of Service
User Offline
Joined: 11th Jun 2004
Location:
Posted: 19th Dec 2004 02:00
I'm currently working on 2D platformer,but I have some shooting problem

Problem_1: IF my character changes direction the bullet stops if it
faces the direction of the bullet it continues as normal

Problem_2: My sprite won't mirror when my character faces left

Problem_3: my bullet sound continously loops to
sound like a machine gun if the
spacebar is held down

problem_4: (the most annoying)
The bullet image in not hidden and is
always showing from where it should
come from the main character



The source code is provided. I couldn't get it formated properly, but you should be able to work out where the line cuts out and wraps onto the next line
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 19th Dec 2004 03:23
Couple of points (which may not solve your problems but may be a start):

1) Please present your code more clearly - its a pain to read code that goes sideways! Start each new command on a new line.

2)



These two statements seem pointless. You are giving a variable a value which it already has, ie. 1.

3)



xlaser will never be equal to xlaser+10, or xlaser-10. It will only ever be equal to xlaser. Think about it - if xlaser is, let's say 25, then your statement is saying if 25=35 then...... or if 25=15 then .....

Try sorting out those three things first, and if it still doesn't work I'll take a closer look.


Login to post a reply

Server time is: 2024-09-23 07:38:26
Your offset time is: 2024-09-23 07:38:26