• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Need Info] Enable/Disable certain abilities from a Learn ability

Status
Not open for further replies.
Level 4
Joined
Jun 30, 2014
Messages
72
I have a Learn ability that holds large numbers of abilities for one hero. The idea is that learning one ability of a certain kind (for example, an ability that detects cloak/burrow) prevents learning other abilities with a similar purpose. I don't see a Validator for this, and I don't know enough about Requirements to know if those will work.

Any ideas? (The simpler the better, mostly.)
 
Level 19
Joined
Jul 2, 2011
Messages
2,162
well you could make an array grouped abilities linked to trig

if a spell is learnt from group A, disable all other spells in that group from the tech tree

disabling abilities in the tech tree is how you disable spells from being learnt.

do you know trig
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Requirements should solve it. Ability type queued or better on unit is greater than 0 means the ability is learnt. As such for your show requirement you want "and" of all your abilities of the same type having queued or better equal to 0 (not learnt). If a single one of them is then learnt the and will evaluate false and so the ability will not be shown in the command card.
 
Level 4
Joined
Jun 30, 2014
Messages
72
TheLordOfChaos201: I know how to use triggers for this, but it's a last resort. I'm much more comfortable with data.

Dr Super Good: Thank you, I thought requirements were the way to do it, but had no idea how to actually use them. Should look like this, right?(the attached image)
 

Attachments

  • RequirementView.PNG
    RequirementView.PNG
    26.2 KB · Views: 130
Level 4
Joined
Jun 30, 2014
Messages
72
Yes that looks like what I would expect. Does it work?

If not then maybe it is a different sort of test node that is needed (I would have to check from an existing map which does something similar).
It's not working. I think I need to arrange it a bit differently. A requirement with a similar setup to this for each ability, but only the other two abilities under the "And".

EDIT:
I found a method that works, one of these for each ability. Learning ability A disables B and C, and so on - it's basically the same as the setup from Dr Super Good, with some tweaking. (See the attached image.)
 

Attachments

  • RequirementFixedView.PNG
    RequirementFixedView.PNG
    26.3 KB · Views: 80
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Just to make it clear what the difference between show and use is...
Use -> If fail then button appears greyed out and show a requirement when hovered over.
Show -> If fail then button does not appear at all.

Some times show can be useful for hiding buttons that are no longer relevant. For example if a player chooses to go down mutually exclusive "upgrade path A" then you can hide anything relevant to "upgrade path B" to declutter the command cards.
 
Level 4
Joined
Jun 30, 2014
Messages
72
I'm using "Use" because I want the whole command card visible while I'm developing a map/mod. Also, I like having the player being able to see the other options, because I'm planning to make a skill point re-spec method. That way, if someone feels like they chose the wrong path, they can still see the other options and make a better decision.

Of course, I can change it to "Show" if I think the learn menu card is getting too messy.

Also, those zeros under the requirement tooltip, is there a way to make those not show? (see attached image.)
 

Attachments

  • RequirementNumbersScreenshotCrop.jpg
    RequirementNumbersScreenshotCrop.jpg
    111.3 KB · Views: 94
Level 4
Joined
Jun 30, 2014
Messages
72
It's been quite a while, I almost forgot to update about this.
I did find a solution, I'll tweak it so it doesn't look this rough (as in the attached image). Giving the zero constant requirement a tooltip replaces the number zero with a bit of text.
 

Attachments

  • RequirementTooltipScreenshotCropped.jpg
    RequirementTooltipScreenshotCropped.jpg
    99.6 KB · Views: 101
Status
Not open for further replies.
Top