• 🏆 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!

[General] Trigger to keep Ability stuck at level

Status
Not open for further replies.
Level 4
Joined
Oct 5, 2012
Messages
52
I want to make a trigger (for a special mod) that should either:

1. Make it impossible to level an ability about a random level
2. Let's start every hero with random level of their ability (and keep them stuck at this level of the ability, with no option to level it up)


Is any of these possible? I couldn't come up with a possible solution...
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
Ability lvls up event
Then check if it is the right ability
Use an ITE to check if it is greater than the max lvl you want for ability.
If it is then set it to max lvl.

To stop the ability from adding skill points to lvl ability simply add the ability to the unit through triggers. ( don't have that ability on the unit in the object editor)
That will stop players from being able to lvl up abilities using the skill points.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
1st way:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Gains a level
    • Conditions
    • Actions
      • Hero - Modify unspent skill points of (Triggering unit): Set to 0 points
2nd way: Don't use hero abilities.


About random abilitie levels:

You have to catalog your abilities and heroes.

Your event (map initialization, hero pick or whatever) runs the following thing:

Set TempUnit = SomeHero
For loop integer TempInteger from 1 to NumberOfHeroes do
-If
---Unit-type of TempUnit = CatalogedHero[TempInteger]
-Then
---Set level of CatalogedAbility1[TempInteger] for TempUnit to (Random integer betwen 1 and MaxLevels )
---Set level of CatalogedAbility2[TempInteger] for TempUnit to (Random integer betwen 1 and MaxLevels )
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
No, probably I didnt explain what I mean properly. Will edit this post with the triggers I had in mind.

Edit// Variables:
ability Ability1
ability Ability2
ability Ability3
Unit-type HeroType
integer MaxLevelOfAbility
integer NumberOfHeroes
integer TempInteger
unit TempUnit
Unit-typeTempUType
  • Map Initiaization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set HeroType[1] = Archmage
      • Set Ability1[1] = Blizzard
      • Set Ability2[1] = Summon Water Elemental
      • Set Ability3[1] = Summon Water Elemental
      • -------- - --------
      • Set HeroType[2] = Paladin
      • Set Ability1[2] = Holy Light
      • Set Ability2[2] = Divine Shield
      • Set Ability3[2] = Devotion Aura
      • -------- etc. etc. --------
      • Set NumberOfHeroes = 2
      • Set MaxLevelOfAbility = 3
  • New hero
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set TempUnit = (Triggering unit)
      • Set TempUType = (Unit-type of TempUnit)
      • For each (Integer TempInteger) from 1 to NumberOfHeroes, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TempUType Equal to HeroType[TempInteger]
            • Then - Actions
              • Unit - Set level of Ability1[TempInteger] for TempUnit to (Random integer number between 1 and MaxLevelOfAbility)
              • Unit - Set level of Ability2[TempInteger] for TempUnit to (Random integer number between 1 and MaxLevelOfAbility)
              • Unit - Set level of Ability3[TempInteger] for TempUnit to (Random integer number between 1 and MaxLevelOfAbility)
            • Else - Actions
Edit// Ah of course if the abilities have different max level you must catalog the max level for each ability too... And then it becomes a mess... >> hashtable :D
 
Status
Not open for further replies.
Top