You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
localfunctiongetPlayersTarget(user)
localcallback=function(getTarget)
--user's cursor turns into the graphic determined previouslyifnotfreeTargeting:getSuccess() then--user right clicked or the targeting failed/was interrupted somehow. Cursor goes back to normal.returnend--user left clicked, determining a tile position to be the target. Cursor goes back to normal.localtargetedPosition=freeTargeting:getPosition()
returntargetedPositionenduser:requestFreeTargeting(entryPointparameters, graphicToTurnTheMouseCursorInto, callback)
end
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: