Action:
|
Gets an entity from an entity ID number.
|
|
Filename:
|
kern/kern_scm/ent_scm.cxx
|
|
APIs:
|
api_pm_lookup_entity
|
|
Syntax:
|
(entity entity-id [part=active])
|
|
Arg Types:
|
entity-id
|
integer
|
|
part
|
part
|
|
Returns:
|
entity | boolean
|
|
Description:
|
This extension returns the entity or
#f if the entity is not found.
|
|
|
entity-id specifies the entity number to be searched.
|
|
|
part is an optional argument that specifies the part identifier.
|
|
Example:
|
; entity
|
|
; Create a solid block.
|
|
(define block1
|
|
|
(solid:block (position 0 0 0)
|
|
|
(position 10 10 10)))
|
|
;; block1
|
|
block1
|
|
;; #[entity 2 1]
|
|
; Retrieve entity 4, if defined.
|
|
(entity 4)
|
|
;; #f
|
|
; Retrieve entity 1, if defined.
|
|
(entity 2)
|
|
;; #[entity 2 1]
|