This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
request_entity [2022/03/14 21:23] – justin | request_entity [2022/03/14 21:43] (current) – justin | ||
---|---|---|---|
Line 14: | Line 14: | ||
====Example: | ====Example: | ||
<code bauxite> | <code bauxite> | ||
- | request_entity(" | + | function validate_entity($selected) begin |
+ | $entity_type = $selected.type; | ||
+ | return $entity_type == OBJECT; | ||
+ | end; | ||
+ | $result = request_entity(" | ||
</ | </ | ||
// | // | ||
- | Prompts the player for an [[entity]]. The custom "validate_coord" function is called to validate whether or not the [[entity]] at the current cursor location is valid. | + | Prompts the player for an [[entity]]. The custom "validate_entity" function is called to validate whether or not the [[entity]] at the current cursor location is an [[object]]. |
<WRAP center round tip 100%> | <WRAP center round tip 100%> | ||
- | Use the **Request | + | Use the **Request |
</ | </ | ||