FANDOM


This command will construct a 3D object from a box mesh.

SyntaxEdit

MAKE OBJECT BOX Object Number, Width, Height, Depth

ParametersEdit

Object Number

Integer
The object number

Width

Float
The width of the box

Height

Float
The height of the box

Depth

Float
The depth of the box

Returns Edit

This command does not return a value.


Description
Edit

The mesh is used as the root limb for the 3D object. The 3D object will be constructed untextured and such models will appear white when displayed. The parameters should be specified using integer values.

Example 1Edit

sync on

sync rate 120

hide mouse

cls 0

ObjectNumber=1

make object sphere ObjectNumber,10

color object ObjectNumber,rgb(0,0,255)

while mouseclick()=0

set cursor 0,0

if scancode()>1 and scancode()<8 then if object exist(ObjectNumber)=1 then delete object ObjectNumber

if inkey$()="1" then make object cube ObjectNumber,10:color object ObjectNumber,rgb(0,0,255)

if inkey$()="2" then make object box ObjectNumber,10,10,20:color object ObjectNumber,rgb(0,0,255)

if inkey$()="3" then make object cylinder ObjectNumber,10:color object ObjectNumber,rgb(0,0,255)

if inkey$()="4" then make object cone ObjectNumber,10:color object ObjectNumber,rgb(0,0,255)

if inkey$()="5" then make object plain ObjectNumber,10,10:color object ObjectNumber,rgb(0,0,255)

if inkey$()="6" then make object triangle ObjectNumber, 0, 0, 0, 5, 5, 0, 0, 5, 0:color object ObjectNumber,rgb(0,0,255)

xrotate object ObjectNumber,wrapvalue(object angle x(ObjectNumber)+1)

yrotate object ObjectNumber,wrapvalue(object angle y(ObjectNumber)+1)

sync

endwhile

delete object ObjectNumber

end