Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 132
    • Issues 132
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Issues
  • #359

Closed
Open
Created Mar 15, 2021 by nicochulo2001@nicochulo2001

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}
Edited Mar 15, 2021 by nicochulo2001
Assignee
Assign to
4.12.X
Milestone
4.12.X
Assign milestone
Time tracking