• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Alternate to SpcDisable?

Sendric

Well-known member
Is there a similar Helper command to SpcDisable? What I'm trying to do is gray out one of the options in the charges list based on an if statement (like how they get grayed out when all charges are used).

Currently, I'm using this code:

Code:
if (hero.childfound[pPsiFocus].field[pIsOn].value = 0) then
    perform assign[Helper.SpcDisable]
endif

This works fine except that it then says "Requirements not met." in both the charges list and the special tab. This seems less than ideal. Is there another way to do this? Note that this particular ability doesn't have a number of charges, so there's no option to use them up. It's just that it's not available to use under certain conditions.

Also note: I tried using ShowCharge for when the value is 1, but using this ability requires expending Psionic Focus, which brings me to a second, somewhat related question. Is there a way to turn off a condition from a different tab? For example, if I turned something on in the charges list, could that automatically turn off something in the conditions list?
 
Last edited:
You could delete the Helper.ShowSpec tag on this special, but that would cause it to disappear rather than be greyed out. You could try the Helper.Exhausted tag, that is meant for charges on the In play tab, I don't know off the top of my head if it also greys out the specials.

Barbarian Rage has a somewhat similar thing going on as question number 2. When you hit the Exhausted button on the in-play tab the Raging button is greyed out and unselected. See if you can adapt that.

I'd recommend having your Psionic Focus condition apply a tag to the hero that other things can detect, rather than having everything check it's state. Seems simpler that way to me.
 
Perfect. Helper.Exhausted looks good. It clues the user that its not available (even though its still selectable which is fine).

I'll check out Barbarian Rage and see what I can glean from it.

I'll check into the tag thing. It probably makes more sense from a true coder's perspective. For me, I'm not sure it makes much of a difference, but I'd rather do things the right way whenever possible.

Thanks!!
 
Back
Top