User Tools

Site Tools


request_entity

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
request_entity [2022/03/14 21:22] justinrequest_entity [2022/03/14 21:43] (current) justin
Line 10: Line 10:
  
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
-|validation_func|Name of custom function that is called to validate the entity at the current cursor location. If supplied, this function should have one input argument, into which the current entity will be passed.|[[String]]|No|+|validation_func|Name of custom function that is called to validate the [[entity]] at the current cursor location. If supplied, this function should have one input argument, into which the current [[entity]] will be passed.|[[String]]|No|
  
 ====Example:==== ====Example:====
 <code bauxite> <code bauxite>
-request_entity("validate_entity");+function validate_entity($selected) begin 
 +  $entity_type = $selected.type; 
 +  return $entity_type == OBJECT; 
 +end; 
 +$result = request_entity("validate_entity");
 </code> </code>
 //Results:// //Results://
-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 Coordinate** function as a way for the player to dynamically place tiles into the world, for example to build walls, bridges, or even houses!+Use the **Request Entity** function as a way for the player to dynamically manipulate the scene, for example to pick a decorative [[object]] in their house and then rotate or scale it.
 </WRAP> </WRAP>
  
request_entity.1647318147.txt.gz · Last modified: 2022/03/14 21:22 by justin