It is a conveniant coding convention of BAM
BAM automatically knows the location of all table object even if you uncheck "render object" in table editor. (oops only some objects like triggers and kickers do this, but the are ways with any object....)
Here are some examples. Lets say we add a non rendered target or trigger named "George2" anywhere at all on table.
We can assign Textures, Miniplayfields and Magnets to that target . This is easier than determining the x, y cordinates.
We just place George on Table and BAM does the rest
Code:
Dim GENIEMAGNET
Set GENIEMAGNET = xBAM.CreateMagneticField(George2.X, George2.Y, -10, 100, 0.5)
Dim Arrow
Set Arrow = xBAM.CreateModel("ArrowTGA", George2.x, George2.y, 100, 100, 0, 0, -0, False, False)
Dim miniplayfield_1
Set miniplayfield_1 = CreateMiniPlayfield(George2, 0, 100)
So with Genie Magnet above I am placing it on top of the hidden George. And then I am making it a MP which I can then rotate randomly if I wish.
For the Miniplayfield shortcut to work , you also have to include this in the code:
Code:
Function CreateMiniPlayfield(ByRef item, Z, H)
Dim X, Y
X = item.X
Y = item.Y
Const e = 0.2
Dim MP
Set MP = xBAM.CreateMiniPlayfield(X-e, X+e, Y-e, Y+e, Z-e, Z+H+e, X, Y, Z)
MP.MoveTo X, Y, Z, 0,0,0, 1, 0
Set CreateMiniPlayfield = MP
End Function