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.

Dark GDK / dbCloneObject Help :)

Author
Message
Javi
15
Years of Service
User Offline
Joined: 27th Feb 2009
Location:
Posted: 28th Feb 2009 07:23
I cant seem to change the dbCloneObject from the next dbCloneObject.

I mean that when i use the dbCloneObject(1,PLAYER) to draw the PLAYER mesh on the screen then when im finished I go to the next
dbCloneObject(x,BRICK)and use this to draw the bricks. But instead, it focuses on the dbCloneObject(x,PLAYER)and draws the PLAYER.x mesh again.

How can i make it so it FOCUSES on the next mesh?

for (x=0;x<20;x++)
{
dbCloneObject(x,PLAYER);
(((this code draws the PLAYER.x mesh 20 times.)))
dbPositionObject(x,x*2,0,0);

(((but then doesnt draw the BRICK here! )))
dbCloneObject(x,BRICK);
dbPositionObject(x,x*2,0,0);
}
it wont let go of the PLAYER mesh.
Edit Post Back to top
J_C
16
Years of Service
User Offline
Joined: 9th Nov 2007
Location:
Posted: 28th Feb 2009 13:08
Hi Javi
You are not changing the x variable on the second dbCloneObject
so you are just remaking the same object number [x]

Try making the second dbCloneObject x + 20
and also second dbPositionObject x + 20
Javi
15
Years of Service
User Offline
Joined: 27th Feb 2009
Location:
Posted: 28th Feb 2009 15:39
Thanks J_C! It works now. Its interesting how it works, didnt realize that indexing was part of it.

Login to post a reply

Server time is: 2024-09-30 19:13:24
Your offset time is: 2024-09-30 19:13:24