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 / can not load multiple images

Author
Message
yacine de lucia
18
Years of Service
User Offline
Joined: 19th Apr 2006
Location:
Posted: 9th Apr 2007 15:04
hello can any one help me on this
i can't load multiple images with one function there is ceartainly a way to do it but this doesn't work
for t = 1 to 98
load image "t.gif",1
next t

the creator
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 9th Apr 2007 15:49
You did not say whether you are using DBC or DBP, but regardless, I don't think you can load .gif images. In DBC you can load .bmp images and .jpg images (at least in 1.13 enhanced you can load .jpg) and in DBP you can load .bmp, .jpg, .tga, .dds, .dib or .png format in order for it to work.

If you are using DBP, you can load an animation, but the animation file must be of the MPEG, AVI,
Quicktime, WAV, AIFF, AU or SND format. [from the HELP files]

Also, I have written a short program that loads multiple images from within a function and it worked fine in DBC and DBP, so I don't know why you would be having trouble with that.
Code Dragon
18
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 9th Apr 2007 15:52
You need to change the image number to t, otherwise it trys to load image 1 over and over again. Try this:



By reading this sentence you have given me brief control of your mind.
yacine de lucia
18
Years of Service
User Offline
Joined: 19th Apr 2006
Location:
Posted: 10th Apr 2007 09:58
thx ..yes i found a way to convert all this in jpg format
and i found the fuction that can simply load all this at the same time
for t = 1 to 98
load image "t.gif", t
next t
i tried this but that does not work...i found by searching in the forum the right code here it is:
for t = 1 to 98
load image ""+str$(t)".jpg",t
next t
"t" must be converted to a string before using it in "load image"
i ve got a new problem now it is adding multiple files to your media ,ctrl+a is not allowed ,and folder attaching don't work too.

the creator
yacine de lucia
18
Years of Service
User Offline
Joined: 19th Apr 2006
Location:
Posted: 10th Apr 2007 10:14
i have also a weird probleme ...it seems when i attached files(finally one by one )... to my exe and use the exe in a different folder ...the game is still working...but instead of having images displayed ...i have coloried
cubes...like if the files were corrupted!!??...it works fine in the same folder...can't understand...
no error messages like file not found...but coloried cubes instead of the all images i have been attaching one by one...really scary!!...hey DBP makers why ctrl+a is not allowed for adding multiple image to your media files?...this is really annoying

the creator
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 10th Apr 2007 19:26
to load all the content of a folder use the add media this way:

- for instance sub folder "textures" in media -

browse till media\textures\ and select one of them like:

media\textures\stone.jpg

delete stone.jpg and put *.*

therefore it would go like:

media\textures\*.*

at this point enable adding and you'll see in your add media window:

media\textures\*.*

the textures folder files will all be there, included in the exe

use this procedure for all your media files folders
yacine de lucia
18
Years of Service
User Offline
Joined: 19th Apr 2006
Location:
Posted: 12th Apr 2007 22:13
thx a lot

the creator

Login to post a reply

Server time is: 2024-09-25 21:26:50
Your offset time is: 2024-09-25 21:26:50