What it does
CreateObjectFromMeshMemblock brings a Memblock object into being: it is how the rest of the program comes to have one. It takes objID (an integer) and memID (an integer), and returns nothing. That is the first of 2 forms. objID is the id you are giving a 3D object: every later call names it by that number.
Syntax
1
CreateObjectFromMeshMemblock(objID integer, memID integer)2
CreateObjectFromMeshMemblock(memID integer) → integerParameters
| Name | Type | In forms |
|---|---|---|
| objID | integer | 1 |
| memID | integer | all |
What each form returns
| 1 | CreateObjectFromMeshMemblock(1, memblock) | nothing |
| 2 | objectFromMeshMemblock = CreateObjectFromMeshMemblock(1) | integer |
Example · generated
Form 1, you choose the id yourself
memblock = CreateMemblockFromFile("assets/data.dat")CreateObjectFromMeshMemblock(1, memblock)DO Sync()LOOPForm 2, the command hands back the id
objectFromMeshMemblock = CreateObjectFromMeshMemblock(1)DO Sync()LOOPCreateMemblockFromFile is there to give the call something to act on; CreateObjectFromMeshMemblock is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.