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.

DarkBASIC Discussion / i have a problem with my sprite movement/animation

Author
Message
redmetal
17
Years of Service
User Offline
Joined: 21st Jan 2008
Location:
Posted: 21st Jan 2008 23:55 Edited at: 22nd Jan 2008 02:05
ok what im basiclly doing is trying to move my sprite and animate it when the button is clicked im trying to gt it to work as a function but it doesnt seem to be working it just does the first image of the animation im not sure what to change/do

it works just fine if i dont have it as a function

heres the code


HEY GUYS
redmetal
17
Years of Service
User Offline
Joined: 21st Jan 2008
Location:
Posted: 22nd Jan 2008 02:11
ok what im basiclly doing is trying to move my sprite and animate it when the button is clicked im trying to gt it to work as a function but it doesnt seem to be working it just does the first image of the animation im not sure what to change/do

it works just fine if i dont have it as a function
heres the code


sorry if posted to many times or something like that i tried editing and i didnt see my message soo sorry

HEY GUYS
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 22nd Jan 2008 02:56 Edited at: 22nd Jan 2008 02:58
1. As a new member, you are on post approval for a while. During this time, please allow time for your posts to be approved. Don't post again if it doesn't appear straight away as this is normal.

2. You have an edit button too, so you can go back and change your own posts at a later time.

3. Your code has some major clangers in it - obviously as you are new to DB. Read a few tutorials and/or the help files before you go any further.

As for your problem, player1x, player1y and walkleft are local variables in the function and in the main loop, they never change.

Finally, it's Sync in the main loop - NOT Sync On, and it should be at the end of the loop.

TDK_Man

redmetal
17
Years of Service
User Offline
Joined: 21st Jan 2008
Location:
Posted: 22nd Jan 2008 03:08
haha thanks yea i am pretty new sorry bout the posting and yea thanks again TDK

HEY GUYS
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 22nd Jan 2008 17:56
Yes, well spotted WindowsKiller - I missed that one!

TDK_Man

redmetal
17
Years of Service
User Offline
Joined: 21st Jan 2008
Location:
Posted: 23rd Jan 2008 00:40
ok thanks guys your suggestions really helped i got it to kinda doo what i wanted it to do with little twiks thanks again

HEY GUYS

Login to post a reply

Server time is: 2025-06-02 10:18:19
Your offset time is: 2025-06-02 10:18:19