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 / Placing trees

Author
Message
BaZko
20
Years of Service
User Offline
Joined: 24th Sep 2004
Location:
Posted: 13th Dec 2004 04:33
How would I make trees appear all over the matrix on random places?
Here is my code:


Please help
BaZko
20
Years of Service
User Offline
Joined: 24th Sep 2004
Location:
Posted: 13th Dec 2004 05:00
I need it to place the trees on the matrix ground.
Thanks for trying to help.
Major Payn
21
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 13th Dec 2004 05:05
Your going to have to use the getgroundheight command then, this might work...


`NUMBER OF TREES:
treenum = 50

for x = 1 to treenum
load object "treefile.x",x
position object x,getgroundheight ,randomz
next x

Guns arnt the problem, people are the problem, shoot all the people and guns arnt a problem anymore.
BaZko
20
Years of Service
User Offline
Joined: 24th Sep 2004
Location:
Posted: 13th Dec 2004 05:08
That code dosnt work.
BaZko
20
Years of Service
User Offline
Joined: 24th Sep 2004
Location:
Posted: 13th Dec 2004 05:50
It still dosnt work.
It says:no such array dimension initialised
BaZko
20
Years of Service
User Offline
Joined: 24th Sep 2004
Location:
Posted: 13th Dec 2004 06:04
My code:
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 13th Dec 2004 06:07 Edited at: 13th Dec 2004 06:12
his code doesnt include any array functions so its your code that is wrong.

[edit] your whole code doesnt even have an array in, must be a typo or something

[edit] ok after reading the code properly there was one typo,



there you go happy now


BaZko
20
Years of Service
User Offline
Joined: 24th Sep 2004
Location:
Posted: 13th Dec 2004 06:09
So how do I fix the code to work?
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 13th Dec 2004 06:12
just when i said that


BaZko
20
Years of Service
User Offline
Joined: 24th Sep 2004
Location:
Posted: 13th Dec 2004 06:17
YES!!!!!!!
It works!!!
Thanks for the help!!

Login to post a reply

Server time is: 2025-05-24 09:56:36
Your offset time is: 2025-05-24 09:56:36