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 Discussion / Looping a bunch of objects' z depth...

Author
Message
flock
19
Years of Service
User Offline
Joined: 10th Mar 2006
Location: Earth
Posted: 18th Jul 2006 13:52
Okay, so I've set up 10 to 200 stars (white plains) and in the main loop I've created a for loop to reposition these stars accordingly (minus the var of speed). This is one of the many (many) variations I've tried for the for loop to see if I can re-setup the z depth of the object once it reaches a certain point.



I must be missing something.

a.k.a. "flockhound"
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 18th Jul 2006 14:22
Uhm, what is zd set to? And why are you assigning a random value to e if 2 lines later you're assigning a new value to it?

flock
19
Years of Service
User Offline
Joined: 10th Mar 2006
Location: Earth
Posted: 18th Jul 2006 14:29
zd is set to 10. That's just it, I don't know what to do. I tried resetting the z depths like this:



But that doesn't work.

Wait...couldn't I just inc the object position z(zr)? I'm going to go try that.

a.k.a. "flockhound"
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 18th Jul 2006 14:30
No, you have to position object, not set object position z

flock
19
Years of Service
User Offline
Joined: 10th Mar 2006
Location: Earth
Posted: 18th Jul 2006 14:35 Edited at: 18th Jul 2006 14:43
I found that this works:



If there's a simpler or better way to do this then please tell me.

a.k.a. "flockhound"

Login to post a reply

Server time is: 2025-05-25 08:29:02
Your offset time is: 2025-05-25 08:29:02