Adding DelVariable (to delete variables)
Summary
When looking at the available ways to interact with variables, it surprised me to see there is no way to delete a variable, only ways to set, add, substract, or make mathematical operations. The mechanic I propose would simply delete the variable (no matter its current value) from the target.
Usage
This mechanic would be utilized alongside any mechanic able to create variables (such as setvariable
) and would allow for the deletion of variables without requiring the setting of a duration.
Value
Adding a way to delete variables would make things like the variableisset
condition more useful, as well as adding finer control over variables overall.
Priority
I do not think it is an issue of very high priority, but it is a rather lightweight suggestion from what I know of programming, which could make it a quick addition to make that wouldn't divert much attention from other features.
Implementation
I imagine the mechanic would have a declaration similar to that of setvariable
, except it wouldn't have more than a single parameter (the variable to be deleted) as all it'd do is delete the variable no matter its current value and status (unless it doesn't exist, which I assume would prompt an error or a warning of some sort)
DelVariableTest:
Skills:
- setvariable{var=target.somevariable;value="yes"}
- delay 20
- delvariable{var=target.somevariable}