API:RemoveSelectedReward
From RoR Wiki
UI Lua API · Interact functions
Version: WAR 1.4.8
Removes one choice reward of the current quest from the selection.
RemoveSelectedReward(rewardIndex)
Arguments
- rewardIndex
number– Number of the choice reward,1to25.
Returns
Nothing.
Details
- Removes
rewardIndexfrom the client's set of selected choice rewards (see AddSelectedReward). Values outside 1–25 are ignored. - Nothing is sent to the server by this call.
- If the argument is not a number, the Invalid Parameters message names
AddSelectedRewardinstead ofRemoveSelectedReward: the function reports its errors under the other function's identity. - The function needs at least one argument and only reads the last one.
Errors
None besides the generic Invalid Parameters message (see Details).
Example
From default/ea_interactionwindow/source/interactionquestwindow.lua:
selected = false RemoveSelectedReward( reward ) EA_Window_InteractionQuest.choiceRewardsData[reward].selected = false EA_Window_InteractionQuest.numSelectedRewards = EA_Window_InteractionQuest.numSelectedRewards - 1
