Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] Function to check if a roll has happened/failed #299

Open
ghost opened this issue Nov 18, 2024 · 1 comment
Open

[REQUEST] Function to check if a roll has happened/failed #299

ghost opened this issue Nov 18, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Nov 18, 2024

Is your feature request related to a problem? Please describe.
I have a situation where I want to know if a roll has failed, most of the time I can use skill_check_result with the ! operator but that function cannot differentiate between rolls that have failed and rolls that haven't happened yet.

Describe the solution you'd like
A function that can tell if a roll has happened so that it can be combined with the skill_check_result function.

E.g.: if (&& (== (skill_check_happened skillName)) (! (skill_check_result skillName)))

Describe alternatives you've considered
I tried to use the get_skill_check function but that returns an object and I couldn't figure out how to get just the happened value in an if statement without first turning it into a variable.

Additional context
I was also thinking you could add a skill_check_fail function to check if a roll has both happened and failed but the naming may make the function names confusing.

@ghost ghost added the enhancement New feature or request label Nov 18, 2024
@liana-p
Copy link
Owner

liana-p commented Nov 19, 2024

image

Yeah the get_skill_check function should have what you need, if you put it in a variable and then use mySkillCheck.happened in your condition it should work I think?

It would be overkill to add new commands for every single thing people might want to check, the more commands there are the more maintenance it is and the harder it is for people to find what they need in documentation.

You can always make a plugin creating your own custom command, or a macro, or a function, that does that in a shortened way if you want a shortcut for it though, it doesn't have to be added as an official command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant