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.

Author
Message
koolaid
23
Years of Service
User Offline
Joined: 26th Jan 2003
Location: Cyberspace
Posted: 19th Mar 2003 08:44
in my game theres objects i use more than once but do i have to keep loading them each time i place one somewhere can i load the object once but use it in several different areas
John H
Retired Moderator
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 19th Mar 2003 15:20
You can only load an object once (Plz correct me if I am wrong) But you can just clone the object if you need more than one.

RPGamer

Current - RPG: Eternal Destiny
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy! Oh ya, and Tat has a plugin for that!
Dr DooMer
23
Years of Service
User Offline
Joined: 22nd Dec 2002
Location: United Kingdom
Posted: 19th Mar 2003 15:32
I didn't know that there was a clone object command in DB...

Anyway, there are things you can do so that you game only has to load the object once, even if you have multiple copies of it.

The easiest way is to use the "load mesh" command. This works in the same way as load object, but shifts the mesh (not the texture) into memory without creating a physical object for it. Then, you load the desired texture into memory by using the "load image" command. Now, providing you don't unload either of these, you can create as many identical copies of the object as you like and when you like by using the "make object" command! Take a look into the command reference to find out how to use each of these.

You can also copy an object into a memblock and then create new objects from that, but it requires the enhancement pack (which I don't have) and doesn't offer many advantages to the average user.

The trouble with both these methods is that neither of them preserve limb or animation data. Doing that is slightly more complex...

Hope this helps!

"I am a living, thinking entity who was created in the sea of information."
minkus
23
Years of Service
User Offline
Joined: 18th Jan 2003
Location: My House
Posted: 19th Mar 2003 17:21
for a = 1 to amt_monsters
load object "<object.x/3ds>",a : append object "object.x/3ds",a,1,100
next a

the point is, you make a loop that makes the object n. times, n. bieng the amt. of loops repeating the loop does...

They say i'm crazy
but im actually REALLY REALLY crazy
Dr DooMer
23
Years of Service
User Offline
Joined: 22nd Dec 2002
Location: United Kingdom
Posted: 19th Mar 2003 17:32
Correct me if I'm wrong, but I think that's what he's trying to avoid - having multiple "load object" commands for identical objects.

With the mesh method, you'd do something similar, but like this:

load mesh "object.x",1
load image "texture.bmp",2

for i = 1 to amt_monsters
make object i,1,2
next i

This will do exactly the same thing as Mr Program's snippet (bar preserving limbs/animation), but only requires a single load of the object in question.

"I am a living, thinking entity who was created in the sea of information."

Login to post a reply

Server time is: 2026-06-11 17:31:47
Your offset time is: 2026-06-11 17:31:47