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 / Annoying Sprite Movement.

Author
Message
Binary Coder
17
Years of Service
User Offline
Joined: 26th Feb 2007
Location: Queensland, Australia
Posted: 6th Jul 2007 13:41
Well, just playing around again and encountered another problem. The sprite movement system seems to be different to Classic too. Or, I have just become sloppy (again) in the last few weeks.

My problem:
The sprite will not postition its self correctly. I thought this would work to place the sprite in the middle of the X axis. But no avail.

PlayerX=Screen Width()/2

A similar problem applies to the sprite control.
The sprite just WILL NOT MOVE FROM THE TOP LEFT CORNER!

Oh well... Here's my code, help would be greatly apprieciated!



Thank You!!

Also, if someone could please help with the jumping calculations.

Zergei
19
Years of Service
User Offline
Joined: 9th Feb 2005
Location: Everywhere
Posted: 6th Jul 2007 14:02 Edited at: 6th Jul 2007 14:02
It doesn't work because the variables your using are been used withing a function but have not been either passed to it, or stated as globals.



Try something along this line. Its an untested code, so if it ain't working just say so and i'll look into it.

Further on my stuff at...
Binary Coder
17
Years of Service
User Offline
Joined: 26th Feb 2007
Location: Queensland, Australia
Posted: 6th Jul 2007 14:06 Edited at: 6th Jul 2007 14:08
Thank you, Ill try it out right away!

EDIT: It works! (sort of)

Thanks again

BC

Login to post a reply

Server time is: 2024-09-27 00:26:14
Your offset time is: 2024-09-27 00:26:14