// this example should work with AGK V1 and V2
// create and position a cylinder
CreateObjectcylinder(1,40,30,5)
SetObjectPOsition(1,-40,0,0)
// create a cylinder but this time use variables
// this allows values to be stored in an external file or if the values need to be used elsewhere in the game, for instance
height = 30
diameter = 20
segments = 12
CreateObjectCylinder(2,height,diameter,segments)
SetObjectPosition(2,0,0,0)
// create a cylinder with lots of segments
//how many does your game actuall need, more segments = more polygons which could affect performance
CreateObjectCylinder(3,40,30,100)
SetObjectPosition(3,30,0,0)
// create a directional light (to make the scene look better)
CreateLightDirectional(1,-1,-1,-0.5,255,255,255)
// position and orientate the camera
SetCameraPosition(1,0,100,-150)
SetCameraLookAt(1,0,0,0,0)
// main loop
do
sync()
loop
Help make AGK better by submitting an example for this command! (All examples are subject to approval)