Object.'type' ?
Blitz3D Forums/Blitz3D Programming/Object.'type' ?
| ||
while searching thru example code i found one that has something interesting in it. Mesh = CollisionEntity (b\entity,i) c.ball = Object.ball EntityName( mesh ) when i saw this i thought it was pointing c to the type attached to the mesh of the collided entity. however i cant get this object command to give me anything but null! Is that possible? i would love to be able to do something like that! eg Mesh = CollisionEntity (b\entity,i) c.ball = Object.ball EntityName( mesh ) c\hitpoints = c\hitpoints - b\damage --oh also, object isnt in the help file, nor the online one |
| ||
Store the type handle in the entities name and this will work fine. c.ball = new ball c\Mesh = createsphere() NameEntity c\Mesh, Handle( c ) Stevie |
| ||
Object and Handle are undocumented blitz commands. Handle give you the integer address of an object: objHandle% = Handle(obj) Object returns the object in a given address: obj.TYourObjType = Object.TYourObjType(objHandle) |
| ||
http://blitzbasic.com/Community/posts.php?topic=53348 |
| ||
Thanks Stevie! Name entity is exactly what i needed. check out the sloution here http://www.blitzbasic.com/codearcs/codearcs.php?code=1629 |