entitypick return code number..

Blitz3D Forums/Blitz3D Beginners Area/entitypick return code number..

Santiworld(Posted 2008) [#1]
target = PickedEntity()

what is the number 92801982039 i have when select an entity?

how can i use this code number?


Stevie G(Posted 2008) [#2]
That is the integer pointer to the entity itself. Assuming you've created global references to the target entity ...


global MySphere = createsphere()
global MyCUbe = createcube()

target = PickedEntity()

if Target = MySphere {do something with mysphere}
if Target = MyCube {do something with mycube}


Zethrax(Posted 2008) [#3]
As Stevie G said, the number returned is the entity handle of the entity that was picked by the pick operation. If the pick operation returns a zero, then no entity was picked (in which case you will get an error if you try to use the returned result with any function that requires an entity handle). Note that entity handle values will be different each time you run your program.


Santiworld(Posted 2008) [#4]
:) thanks... !