(AGK version: 2(V2017.12.12))
Submitted: 2018-03-03 10:19:38
// Project: CreateObjectFromMeshMemblock 
// Created: 2018-03-02
// By: TomToad

// show all errors
SetErrorMode(2)

// set window properties
SetWindowTitle( "CreateObjectFromMeshMemblock" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window

// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts


box = CreateObjectBox(10,10,10)
meshmemblock = CreateMemblockFromObjectMesh(box,1)
direction as float = 1.0
time as float
wait as float = 5.0
vertex as integer[2] = [1,19,20]

do
	time = GetFrameTime()
	RotateObjectLocalX(box,.1)
	RotateObjectLocalY(box,.2)
	RotateObjectLocalZ(box,.3)
	for i = 0 to 2
		SetMeshMemblockVertexPosition(meshmemblock,vertex[i], 
			GetMeshMemblockVertexX(meshmemblock,vertex[i])+direction*time,
			GetMeshMemblockVertexY(meshmemblock,vertex[i])+direction*time,
			GetMeshMemblockVertexZ(meshmemblock,vertex[i])+direction*time)
			
	next
	wait = wait - time
	if wait <= 0.0 
		wait = 5.0
		direction = -direction
	endif
	SetObjectMeshFromMemblock(box,1,meshmemblock)
	sync()
loop
Help make AGK better by submitting an example for this command!
(All examples are subject to approval)
Login to post an example of your own.