• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Skill changing attack + passive problem

Status
Not open for further replies.
Level 2
Joined
Jun 27, 2016
Messages
13
So I've tried to make a skill that changes attack and gives a passive ability to the hero depending on which form is he. Skill is based on the Bear Form and both dummy passives in spellbook are based on Bombs.
My translated triggers:
Trigger FireAttack
  • Unit - A unit starts casting ability
  • (Ability being cast) equals to ChangingForm
  • Unit - Remove spellbook FrostAttack from (Triggering unit)
  • Unit - Add spellbook FireAttack to (Triggering unit)
  • Unit - Set level of FireAttack for (Triggering unit) to (Level of ChangingForm for (Triggering unit)
  • Trigger - Turn on FrostAttack <gen>
  • Trigger - Turn off (This trigger)
Trigger FrostAttack (initially disabled)

  • Unit - A unit starts casting ability
  • (Ability being cast) equals to ChangingForm
  • Unit - Remove spellbook FiretAttack from (Triggering unit)
  • Unit - Add spellbook FrostAttack to (Triggering unit)
  • Unit - Set level of FireAttack for (Triggering unit) to (Level of ChangingForm for (Triggering unit)
  • Trigger - Turn on FireAttack <gen>
  • Trigger - Turn off (This trigger)
So those two triggers are suppose to disable each other when I use an ability to add dummy passive ability and I guess it kinda works, but then I have this trigger:


  • Unit - A unit is attacked
  • (Level of FrostAttack for (Attacking unit)) is not equal to 0
  • Set PositionOfAttackedUnit = (Position of (Attacked unit))
  • Unit - Create 1 dummy for (Owner of (Attacking unit)) at PositionOfAttackedUnit facing default degrees
  • Unit - Set level of FireAttack for (Triggering unit) to (Level of ChangingForm for (Triggering unit)
  • Set dummy = (Last created unit)
  • Unit - Add DummyFrostNova to dummy
  • Unit - Set level of DummyFrostNova for dummy to (Level of FrostAttack for (Attacking unit)
  • Unit - Order (Last created unit) to Undead - Lich - Frost Nova (Attacked unit)
  • Wait 2.00 seconds
  • Unit - Remove dummy from the game
  • Custom script: call RemoveLocation(udg_PositionOfAttackedUnit)
From what I've observed via
  • Game - Display to (All players) the text: (String((Level of FrostAttack for (Attacking unit))))
in 2 previous triggers Level of FrostAttack is not equal to 0, but the trigger doesn't seem to be running at all (tried to debug it with displaying lvl of FrostAttack each time, but nothing appears during the attacks.
I know the triggers don't look like they're suppose on forum, but I'm too tired to fix it.
 
Last edited:
Level 6
Joined
May 20, 2014
Messages
228
Dear god, did you put trigger tags for every individual line? Just copy the whole thing and put [trigger ] at the start and [ /trigger] at the end (without space).
 
Level 2
Joined
Jun 27, 2016
Messages
13
I fixed the original post.
Try to replace that wait with expiration timer
  • Unit - Add a 2.00 second Generic expiration timer to dummy

I've done it and nothing has changed. I added spellbook in object editor and the last trigger works, so now I'm confused.
 
Level 12
Joined
Nov 3, 2013
Messages
989
Try changing it to "finish casting" or "start effect" instead of "begin", because iirc morphing will remove abilities that aren't permanent. It could be that you're adding abilities but then they're removed right after.
 
Level 8
Joined
Jan 28, 2016
Messages
486
Try changing it to "finish casting" or "start effect" instead of "begin", because iirc morphing will remove abilities that aren't permanent. It could be that you're adding abilities but then they're removed right after.

This. The alternative would be to make them permanent, as discussed in this recent thread. There's also the last post of this thread which is more relatable to the problem at hand. Additionally you can merge your first two triggers into one like so (but it's up to you):

  • Merged
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Level of ChangingForm for (Triggering unit)) Greater than 0
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(bearform))
        • Then - Actions
          • Unit - Remove spellbook FireAttack from (Triggering unit)
          • Unit - Add spellbook FrostAttack to (Triggering unit)
          • Unit - Set level of spellbook FrostAttack for (Triggering unit) to (Level of ChangingForm for (Triggering unit))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Issued order) Equal to (Order(unbearform))
            • Then - Actions
              • Unit - Remove spellbook FrostAttack from (Triggering unit)
              • Unit - Add spellbook FireAttack to (Triggering unit)
              • Unit - Set level of spellbook FireAttack for (Triggering unit) to (Level of ChangingForm for (Triggering unit))
            • Else - Actions
 
Status
Not open for further replies.
Top