— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
This is an old revision of the document!
Prompts the player for a tile coordinate using a 3D selection cursor. The selected coordinate is returned by this function and can be stored into a property or variable for further action. While the selection cursor is active, the player can adjust it up and down using the move forward/backward keys or the up/down arrow keys (based on the range set by the minimum and maximum Z values).
request_coordinate(start_z, min_z, max_z, step_z, validation_func)
Argument | Description | Type | Required |
---|---|---|---|
start_z | Initial Z coordinate of the selection cursor. | Number | Yes |
min_z | Minimum Z coordinate allowed. | Number | Yes |
max_z | Maximum Z coordinate allowed. | Number | Yes |
step_z | Amount to change the Z coordinate by when adjusting up/down. | Number | Yes |
validation_func | Name of custom function that is called to validate the coordinate at the current cursor location. If supplied, this function should have one input argument, into which the current coordinate will be passed. | String | No |
request_coordinate(0, -64, 64, 16, "validate_coord");
Results: Prompts the player for a tile coordinate, with a starting Z value of zero, a minimum of -64, a maximum of 64, and increments of 16. The custom “validate_coord” function is called to validate whether or not the coordinate at the current cursor location is valid.
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!