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 / Sprite can Shoot both way !Help!

Author
Message
Blackout1471
12
Years of Service
User Offline
Joined: 21st Dec 2011
Location: Visual C++ Express
Posted: 23rd Dec 2011 16:01
anyone have a code on a sprite that can shoot both way, because my code doesn't work when i shoot the and the player goes to the right it shoot to the right but if i turn left and the bullet is still in air the bullet change direction to the left. anyone have a code for that?

my code

Thanks.

Beginner In the Language.
Hassan
14
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 23rd Dec 2011 20:17
i cannot see your code, seems to be broken
anyhow, if you are moving the bullet with dbMoveSprite then have your bullet rotate at the same angle as your player once it's fired

negi
13
Years of Service
User Offline
Joined: 16th Feb 2011
Location:
Posted: 23rd Dec 2011 20:48
Yea can you post your code?

All is revealed with time.
Blackout1471
12
Years of Service
User Offline
Joined: 21st Dec 2011
Location: Visual C++ Express
Posted: 23rd Dec 2011 23:53
Sry i didn't get it in



Beginner In the Language.
Hassan
14
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 24th Dec 2011 06:39
you should rotate it only once (when shooting begins), else you'll have to make a variable for the bullet's direction and set it when shooting begins, and then use it to move the sprite

Blackout1471
12
Years of Service
User Offline
Joined: 21st Dec 2011
Location: Visual C++ Express
Posted: 25th Dec 2011 21:02
Well... it didn't get me anywhere... it just did so my bullet rotated the wrong way.

it stills change direction when i change direction with my player.

Thanks.

Beginner In the Language.
Blackout1471
12
Years of Service
User Offline
Joined: 21st Dec 2011
Location: Visual C++ Express
Posted: 27th Dec 2011 10:30
I got it to work.

and to all the others that maybe got the same problem.



Beginner In the Language.

Login to post a reply

Server time is: 2024-04-20 10:21:58
Your offset time is: 2024-04-20 10:21:58