Hey everyone, I'm new here, as well as to DB. I'm a student and our school just got it, so no one really knows much. I figured it'd be best to come straight here.
I have a bit of code, and when i try to insert the cones, it tells me "Object already exists"
I'm not sure what this means exactly, and the teacher is no help
here's the code im working with
Rem Setup sync
Sync On
Sync Rate 30
hide mouse
Rem title screen
cls
load bitmap "40k.jpg"
ink rgb(255,255,255),0 : set text font "arial" : set text size 14 : set text to normal : set text transparent
center text 320,460,"Copyright (c) Homeless Man/Backwards Man Inc."
sync
do
x=scancode() : if Keystate(x)=1 then goto MainSection
sync
loop
MainSection:
Rem Create matrix
Make Matrix 1,10000,10000,100,50
Rem mY is the variable for random matrix height
mY=100
Rem Position Camera above the matrix
Position Camera 0,1000,0
Rem Point camera at matrix center
Point Camera 1000,0,1000
Rem Load Textures
Load image "water03.bmp",2
Load image "stone01.bmp",3
Load image "botbody1.bmp",4
Load image "backdrop.jpg",5
backdrop on
color backdrop rgb(0,0,255)
Rem texture matrix
Load image "grass08.bmp",1
Prepare matrix texture 1,1,2,2
rem Create Character
load object "idle.x",10
append object "walk.x",10,100
yrotate object 10,180
fix object pivot 10
loop object 10,0,20
hide limb 10,1
set object collision on 10
texture object 10,4
position object 10, 5000,25,5000
rem FAULTY CONES
for x = 1 to 500
make object cone x, rnd(200)+50
Texture object x,3
position object x, rnd(10000), rnd(10000), rnd(10000)
next x
Do
Rem Store Object angle Y in aY#
aY# = Object angle Y(10)
Rem Control input for camera
If Upkey()=1 then Move object 10,10
If Leftkey()=1 then Yrotate object 10,Wrapvalue(aY#-5)
If Rightkey()=1 then Yrotate object 10,Wrapvalue(aY#+5)
If Downkey()=1 then Move object 10,-10
If Inkey$()="v" then 10pY# = 10pY# + 5
if Inkey$()="x" then 10pY# = 10pY# - 5
Rem Detect collision
If Object collision(10,0)>0 then position object 10,X#,15,Z#
Rem get player object position and store in X# and Z#
X# = Object position x(10)
Z# = Object position z(10)
Rem get new camera position and store in cZ# and cX#
cZ# = Newzvalue(Z#,aY#-180,100)
cX# = Newxvalue(X#,aY#-180,100)
Rem position camera
Position Camera cX#,100,cZ#
Rem point the camera at the player object
Point camera X#,50,Z#
Sync
Loop
end
Sorry its a nooby question, but I'd appreciate the help
Thanks!