// this example should work with AGK V1 and AGK V2
// press spacebar or the on screen button to turn the cone invisible
// make a box (it will automatically be positioned at 0,0,0)
CreateObjectCone(1,20,15,16)
// create a directional light
CreateLightDirectional(1,-1,-1,0,255,255,255)
// position and orientate the camera
SetCameraPosition(1,0,45,-90)
SetCameraLookAt(1,0,0,0,0)
// main loop
do
// press the spacebar or on screen button to make the cone invisible
if GetButtonState(1) = 0
// make cone visible
SetObjectVisible(1,1)
else
// make cone invisible
SetObjectVisible(1,0)
endif
sync()
loop
Help make AGK better by submitting an example for this command! (All examples are subject to approval)