This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
request_coordinate [2022/03/14 21:12] – justin | request_coordinate [2022/03/14 21:35] – justin | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- | ---- | ||
- | Resets | + | Prompts |
====Signature: | ====Signature: | ||
Line 13: | Line 13: | ||
|min_z|Minimum Z coordinate allowed.|[[Number]]|Yes| | |min_z|Minimum Z coordinate allowed.|[[Number]]|Yes| | ||
|max_z|Maximum Z coordinate allowed.|[[Number]]|Yes| | |max_z|Maximum Z coordinate allowed.|[[Number]]|Yes| | ||
- | |step_z|Amount to change the Z coordinate by when incrementing | + | |step_z|Amount to change the Z coordinate by when adjusting |
- | |validation_func|Name of custom function that is called to validate the coordinate at the current cursor location. | + | |validation_func|Name of custom function that is called to validate the [[coordinate]] at the current cursor location. |
====Example: | ====Example: | ||
<code bauxite> | <code bauxite> | ||
- | request_coordinate(0, | + | function validate_coord($selected) begin |
+ | if tile[$selected.x, | ||
+ | return false; | ||
+ | end; | ||
+ | $valid_coords = array[coord[7, | ||
+ | return $valid_coords contains $selected; | ||
+ | end; | ||
+ | $result = request_coordinate(0, | ||
</ | </ | ||
// | // | ||
- | Prompts the player for a [[tile]] [[coordinate]], | + | Prompts the player for a [[tile]] [[coordinate]], |
<WRAP center round tip 100%> | <WRAP center round tip 100%> |