-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Rune Magic could use targeting support client side in co-operation with a server side entry point.
In the form of an entry point that requests the user to select a tile (similar to how dialogs work) by turning the cursor into a wand, left clicking on a tile to select it, right clicking to cancel the action. Entry point should return as boolean and position(x,y,z) for whether it succeeded and what the position selected is.
Bonus points if what graphic the cursor turns into can be decided in the entry point, so this function can be used for other areas of the games development as well.
Example of what it would look like lua side:
local function getPlayersTarget(user)
local callback = function(getTarget)
--user's cursor turns into the graphic determined previously
if not freeTargeting:getSuccess() then
--user right clicked or the targeting failed/was interrupted somehow. Cursor goes back to normal.
return
end
--user left clicked, determining a tile position to be the target. Cursor goes back to normal.
local targetedPosition = freeTargeting:getPosition()
return targetedPosition
end
user:requestFreeTargeting(entryPointparameters, graphicToTurnTheMouseCursorInto, callback)
endReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels