Pretty bored trying to think of what next to add to my game, so I just came up with these basic functions. I know anyone could do them but they may help some newcommers.
Basically instead of having to type make object over and over again for the same object with a different object number, just use the functions to create them in less lines. I added in a simple positioning function aswell:
FUNCTION MAKE_BOXES(Amount#,First#,X#,Y#,Z#)
FOR i = First# to First#+Amount#
MAKE OBJECT BOX i, X#,Y#,Z#
NEXT i
ENDFUNCTION
FUNCTION MAKE_SPHERES(Amount#,First#,Size#,Rows#,Columns#)
FOR i = First# to First#+Amount#
MAKE OBJECT SPHERE i, Size#,Rows#,Columns#
NEXT i
ENDFUNCTION
FUNCTION MAKE_CUBES(Amount#,First#,Size#)
FOR i = First# to First#+Amount#
MAKE OBJECT CUBE i, Size#
NEXT i
ENDFUNCTION
FUNCTION MAKE_CYLINDERS(Amount#,First#,Size#)
FOR i = First# to First#+Amount#
MAKE OBJECT CYLINDER i,Size#
NEXT i
ENDFUNCTION
FUNCTION MAKE_PLAINS(Amount#,First#,Width#,Height#)
FOR i = First# to First#+Amount#
MAKE OBJECT PLAIN i, Width#,Height#
NEXT i
ENDFUNCTION
FUNCTION MAKE_TRIANGLES(Amount#,First#,X1#,Y1#,Z1#,X2#,Y2#,Z2#,X3#,Y3#,Z3#)
FOR i = First# to First#+Amount#
MAKE OBJECT TRIANGLE i, X1#,Y1#,Z1#,X2#,Y2#,Z2#,X3#,Y3#,Z3#
NEXT i
ENDFUNCTION
FUNCTION MAKE_CONES(Amount#,First#,Size#)
FOR i = First# to First#+Amount#
MAKE OBJECT CONE i, Size#
NEXT i
ENDFUNCTION
FUNCTION POSITION_OBJECTS(Amount#,First#,X#,Y#,Z#)
FOR i = First# to First#+Amount#
POSITION OBJECT i, X#, Y#, Z#
NEXT i
ENDFUNCTION
The ammount specifies how many of the object you want, the first specifies the starting object number you want the program to....start....from (so if you wanted to create 10 objects starting from object 17 and ending at object 27, just make the first# equal 17), and the other parameters specify the dimensions of the object. The position object function is at the bottom, for random positioning just set the X#, Y# and Z# values using the rnd() command.
Hope it helps someone.
Current Projects: SHADE - Game Maker | Mecho - TGC Puzzle Entry | Halo Physics Engine | COLD - Polygonal Collision Detection