• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

how can i make research unlock hero spell levels

Status
Not open for further replies.
Level 4
Joined
Aug 17, 2011
Messages
119
not sure about this , but you can you not just trigger in abilities as your upgrade finishes.

event = upgrade/research done
cond. = upgrade = *hero ability*
trigger = add ability to hero and set ability level

or something like that...
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
  • Untitled Trigger 009
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to Animal War Training
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off Untitled Trigger 007 <gen>
  • Untitled Trigger 007
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned skill level) Equal to 2
    • Actions
      • Custom script: set udg_ab = GetLearnedSkill()
      • Unit - Set level of ab for (Triggering unit) to ((Level of ab for (Triggering unit)) - 1)
      • Hero - Modify unspent skill points of (Triggering unit): Add 1 points
      • Game - Display to Player Group - Player 1 (Red) the text: Can not learn now.
Or single trigger:

  • Untitled Trigger 007
    • Events
      • Unit - A unit Learns a skill
      • Unit - A unit Finishes research
    • Conditions
    • Actions
      • Custom script: if GetHandleId(GetTriggerEventId()) == 37 then
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Researched tech-type) Equal to Animal War Training
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
      • Custom script: else
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Learned skill level) Equal to 2
        • Then - Actions
          • Custom script: set udg_ab = GetLearnedSkill()
          • Unit - Set level of ab for (Triggering unit) to ((Level of ab for (Triggering unit)) - 1)
          • Hero - Modify unspent skill points of (Triggering unit): Add 1 points
          • Game - Display to Player Group - Player 1 (Red) the text: Can not learn now.
        • Else - Actions
      • Custom script: endif


You can replace ab ans learned skill level with your ability.
 
Level 4
Joined
Aug 17, 2011
Messages
119
I'm working on something similar, but for units not hero's so it is slightly different... and a bit easier... Anyway, Maker, from what I can gather, correct me if I'm wrong, but your trigger adds 1 unspent skill point when the upgrade finishes as opposed to leveling up the the specific ability?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Kno_Mad
As for the leveling up, it prevents you from level the ability if you doesn't upgrade it yet

If you have upgraded it, the trigger that prevent your ability from being leveled up will be turned off, therefore you can add the level of the ability

If you doesn't upgrade it yet, the trigger remains turned on, therefore it doesn't let you to level up any ability before upgrading it first, therefore the level would be downgrade from Level 2 to Level 1 back and skill points that you have used, will be unspent back as a sign of refund

But, I bet his system only works for single-time use only as he plays with the turn off/on a single trigger

However, he can pull this off if you include multiple several triggers (but this would require a lot of work)
andreasaspenberg
I have said this in the comments above, you will need multiple trigger if you really want to follow Maker's trigger
Or perhaps you can pull this off in a single trigger, with a network of I/T/E multiple functions?
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
  • Untitled Trigger 007 Copy
    • Events
      • Unit - A unit Learns a skill
    • Conditions
    • Actions
      • Custom script: set udg_ab = GetLearnedSkill()
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Researched tech-type) Equal to Iron Forged Swords
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Current research level of Iron Forged Swords for (Triggering player)) Less than (Level of ab for (Triggering unit))
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of ab for (Triggering unit)) Equal to 1
                • Then - Actions
                  • Unit - Remove ab from (Triggering unit)
                • Else - Actions
                  • Unit - Set level of ab for (Triggering unit) to ((Level of ab for (Triggering unit)) - 1)
              • Hero - Modify unspent skill points of (Triggering unit): Add 1 points
              • Game - Display to Player Group - Player 1 (Red) the text: Can not learn now.
            • Else - Actions
        • Else - Actions
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
thats a third party program and thats forbidden.

What is a third party program? Are you referring to SimError? It a custom function meant to be used in projects, multiplayer included.

at least the abilities doesnt work without research at the moment. i do however want each level to be hidden until it is researched.

Then disable the ability at map initialization and enable when the upgrade is reserached the first time.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
You have to describe what you want in as much detail as you can. Currently you're adding conditions with every post.

I already posted all that you should need. Initially disable the ability. Player - Enable/Disable ability ability. When the ability is researched the first time, enable the ability.

Then use the basics I displayed in the last trigger I posted.
 
might be possible... just make the hero ability into just one level, then make a corresponding Engineering Upgrade ability per supposedly level of that ability, plus another ability which is the "upgraded" version of the real ability?

but that would make you hit the 5 hero ability max in a matter of few levels, since you would need one engineering upgrade per level of the ability so that you'd be able to restrict its learning until you obtain the research...

I think Maker's suggestion (to just send an error message if the ability shouldn't be learned, then return the ability level to what it was before and readd 1 skill point to the hero) would be the best way to deal with this if you want it the ability learning process to still be the default used by wc3...
 
Level 25
Joined
May 11, 2007
Messages
4,650
Use dummy hero abilities then? After each level, remove the hero ability, set the normal ability to the level learned, then add another hero dummy ability, except this one is set to require lvl 2 of the research.

Needed:
One normal ability with many levels
Hero dummy abilities for each of the ability levels
One trigger
 
thats a third party program and thats forbidden. at least the abilities doesnt work without research at the moment. i do however want each level to be hidden until it is researched.

The ** are you talking about? It's not third party, it's GUI. I swear the @@s that come into hive... **in annoying.
 
Last edited by a moderator:
  • Angry
Reactions: Rui
Status
Not open for further replies.
Top