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 sheets

Author
Message
Sqwerty
20
Years of Service
User Offline
Joined: 8th Oct 2004
Location:
Posted: 31st Oct 2004 15:15
how can i use a sprite sheet w/ all the sprites ON IT to make a character move? its saves the amount of files i gotta upload and such.. Was just wonderin cause i saw a thing on sprite sheets.. is there a code or script and something i should know about it?
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 31st Oct 2004 17:16
There is an example that comes with DBP showing how to do this.
sprite1-example.dba.dbpro in the help files for sprite showcase.

Sqwerty
20
Years of Service
User Offline
Joined: 8th Oct 2004
Location:
Posted: 31st Oct 2004 17:31
i have the trial right now.. i dunno if it will have it..
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 31st Oct 2004 18:10 Edited at: 31st Oct 2004 18:11
In that case ... I don't know if you would have it either. There are a couple of options. You can use create animated sprite command along with the play sprite command.

or
you can load the image as a bitmap and cut it up and change the sprites image manually.

Here is the image pattern that code is for


Sqwerty
20
Years of Service
User Offline
Joined: 8th Oct 2004
Location:
Posted: 31st Oct 2004 20:01
umm.. kinda confused.. where do i put the image?
Sqwerty
20
Years of Service
User Offline
Joined: 8th Oct 2004
Location:
Posted: 31st Oct 2004 20:08
bah sorr y2nd post.. if u could explain the script.. that would help.. and what if i had a second row? use the cutting script?
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 1st Nov 2004 02:23 Edited at: 1st Nov 2004 02:56
OK. The first code works like this.


[edit] The second code is like this.


[edit2] Here is an example image that goes with both of those.
Red numbers are image numbers. Yellow shows which variable goes with which cutting line. Imagine it cuts where there is a red line.


Sqwerty
20
Years of Service
User Offline
Joined: 8th Oct 2004
Location:
Posted: 1st Nov 2004 03:55
ok.. so if i wanna skip to a certain immage (like from walk to stand to attack) what do i do? put in an IF and ENDIF? and then re-put the cut script somehow? im using the 2nd script BTW its alot better
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 1st Nov 2004 05:06 Edited at: 1st Nov 2004 05:06
Something like this. ukp and skp are used to make sure the image numbers reset to the first frame when the key is first pressed and also to make sure if you push both buttons at the same time it won't try to do both animations at the same time.


Login to post a reply

Server time is: 2024-11-27 15:44:18
Your offset time is: 2024-11-27 15:44:18