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 / Non-working sprite movement. Help!

Author
Message
danm36
16
Years of Service
User Offline
Joined: 13th Jan 2008
Location:
Posted: 19th Jun 2008 22:07 Edited at: 20th Jun 2008 20:02
I would like to request help for my game. This is the code I currently use.



Now the problem is that fact that if I press the right arrow button the character goes right with perfect animations and eveything, but if I press left the character just stands there aimlessly.

Download media here

I would like to learn how to code:

3rd person in the style of MGS, 1st/3rd person interchangeable modes in the style of MGS2
Destrugter 1
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location:
Posted: 19th Jun 2008 22:50
Could you include the media?

http://www.runenerds.com - a RuneScape community that is growing. (New community)
Zergei
19
Years of Service
User Offline
Joined: 9th Feb 2005
Location: Everywhere
Posted: 20th Jun 2008 04:39
Your problem is here



Even though "movecase" is set to 1 because you're pressing left, it detects that you're not pressing right and so sets it to 4.



Here's a fast, untested, approach to solving it.

Further on my stuff at...
TurboSquid.com
The3dStudio.com
danm36
16
Years of Service
User Offline
Joined: 13th Jan 2008
Location:
Posted: 20th Jun 2008 18:09 Edited at: 20th Jun 2008 18:20
Thanks. I also noticed that I didn't have to mirror the sprite. The sprite I first used on faced one dir so I set up a system to mirror it. I now got an image with the sprite facing both ways but I didn't remove the current code.

Thanks again.

New problem: Sprite works fine when going left and right, but if it faced left and you press right, it cycles the left anim once before going to the right anim. Updated code and media at first post.

I would like to learn how to code:

3rd person in the style of MGS, 1st/3rd person interchangeable modes in the style of MGS2

Login to post a reply

Server time is: 2024-11-25 22:46:16
Your offset time is: 2024-11-25 22:46:16