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

Author
Message
BlueKlayman
15
Years of Service
User Offline
Joined: 22nd Jun 2009
Location: Near that actor guy
Posted: 9th Jul 2010 06:13 Edited at: 9th Jul 2010 06:23
EDIT: I used the search function and found what I was looking for.


Hey guys,
I have yet another problem. This time, I have got my image to move. The problem is, I can only move left and up, but not right or down.
Here is the code:



And the image is attached to the post if you want it. Just a 50*50 stickman.

Thanks,
BKman

Attachments

Login to view attachments
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 9th Jul 2010 18:19 Edited at: 9th Jul 2010 18:33
Glad you found what you were looking for. For anybody else looking for the same thing...

From the help file for SPRITE



Notice that the XPos and YPos are integers. If you want to slow them down, do it some other way than using .01 or .02 changes.

Here's an example:



or even



or even as tight as this...





smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 9th Jul 2010 19:10 Edited at: 9th Jul 2010 19:12
This ought to work for u man. first off id like to say it is not neccesary to put the sprite command in each "if" command the program loop will auto update them all as it loops just need the variable thats all. all i did is is add # after each variable man.
got any more questions feel free to email

A child's dream never dies.
BlueKlayman
15
Years of Service
User Offline
Joined: 22nd Jun 2009
Location: Near that actor guy
Posted: 10th Jul 2010 05:22
Well, I even have the sprite animations now. So, it is all good. But I will email you if I have the need to do so.
Thanks.

Login to post a reply

Server time is: 2024-11-23 14:10:37
Your offset time is: 2024-11-23 14:10:37