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 Professional Discussion / move instanced objects

Author
Message
Zipir
16
Years of Service
User Offline
Joined: 11th Aug 2009
Location: Turkey
Posted: 21st Jan 2013 11:32
Hello...i have a trouble how can i pick and move (instanced) objects with mouse?

my simple code:
load object x
instacing 10 object at randomly position

can anyone help
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 21st Jan 2013 11:44 Edited at: 21st Jan 2013 11:59
Hi Zipir...instead of making instances of your object, you could do clons of if :





EDITED
Here's another example that I used for my lathe tool program.











Cheers.

I'm not a grumpy grandpa
Zipir
16
Years of Service
User Offline
Joined: 11th Aug 2009
Location: Turkey
Posted: 21st Jan 2013 12:12
Thank you soo much but with using clone object command its have too much memory usage like 1000 different tree on the terrain. it must be another way with instanced objects?
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 21st Jan 2013 12:34
You can do it with innstanced objects aswell, but why do you have to place them all with mouse?.

I'm not a grumpy grandpa
Zipir
16
Years of Service
User Offline
Joined: 11th Aug 2009
Location: Turkey
Posted: 21st Jan 2013 12:59 Edited at: 21st Jan 2013 13:00
because im trying to make a map editor for forum users and me
simple:
*paint and edit terrain with mouse(advanced terrain with blenmap 4 different texture)
*place objects with mouse on terrain (tree,plants,buldings,mobs,paticles,etc...)


and yes its work with instanced objects thank you soo much again your code is very helpfull [img]<a

Zipir
16
Years of Service
User Offline
Joined: 11th Aug 2009
Location: Turkey
Posted: 21st Jan 2013 13:03
gui is not soo cool i know its just simple 2d box commands
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 21st Jan 2013 13:06
Zipir - Hi, you are like totally left field man!

That looks good!

chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 21st Jan 2013 14:42
I know what you mean Zipir, and with the piece of code I sent to you, you can do that....just select the object and place it where you want...play with x and z and get ground height for the y

I have to say that your landscape looks really good...you are in the right way


Cheers.

I'm not a grumpy grandpa
Zipir
16
Years of Service
User Offline
Joined: 11th Aug 2009
Location: Turkey
Posted: 21st Jan 2013 15:42
thank you my friend
Zipir
16
Years of Service
User Offline
Joined: 11th Aug 2009
Location: Turkey
Posted: 21st Jan 2013 20:21 Edited at: 21st Jan 2013 20:25
chafari --- when i editing terrain and painting terrain object all textures must be memblock right? for fastest speed ... simply advanced terrain creating with heightmap image... can you help a bit for fastest speed tnx... maybe a few idea for best way


like so

make memblock from terrain object
mame memblock from images (blendmap,heightmap images)
and when map saving save memblock to image file
when i load scene convert them again to memblocks

is the right way?
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 22nd Jan 2013 13:48
What I do, is blend images to the object terrain....now I'm outdoor. There's a good example made by Green Gandaf...this the same method I use from the first time I saw his code

I'm not a grumpy grandpa

Login to post a reply

Server time is: 2026-07-07 04:31:49
Your offset time is: 2026-07-07 04:31:49