• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Need Help with my first spell...

Status
Not open for further replies.
Level 16
Joined
Mar 8, 2009
Messages
975
Hi hivers, i´m a really n00b in triggers... i´m doing my first spell with triggers, but its doesnt works. I dont knows why.
The Idea:
In my map you are a wolfmaster, obviously, you can summon wolf.
This wolfs are called Night Wolfs, when you cast another skill, called High Moon, all the Night Wolfs be replaced with Moon Wolf (Another unit) and your hero receive a attack bonus, after 20 seconds, the ability over and the wolfs are killed.

This is my trigger, but its doesnt work... fix it for me plz...
  • High Moon
    • Events
      • Unit - A unit start the effect of an ability
    • Conditions
      • (Ability being cast) Equal to High Moon
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Level of High Moon for Picked unit Equal to 1
        • Then - Actions
          • Unit Group - Pick every unit in (Units of Type NightWolf) and do (Unit - Replace (Triggering unit ) with a MooWolf using the default new unit life and mana)
          • Unit Add Attack Bonus(+16) to WolfMaster 0062 <gen>
          • Wait 20.00 game-time seconds
          • Unit Group - Pick every unit in (Units of Type NightWolf) and do (Unit - Kill (Triggering unit))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Level of High Moon for Picked unit Equal to 2
            • Then - Actions
              • Unit Group - Pick every unit in (Units of Type NightWolf) and do (Unit - Replace (Triggering unit ) with a MooWolf using the default new unit life and mana)
              • Unit Add Attack Bonus(+32) to WolfMaster 0062 <gen>
              • Wait 20.00 game-time seconds
              • Unit Group - Pick every unit in (Units of Type NightWolf) and do (Unit - Kill (Triggering unit))
(The trigger continues with the others levels...)

Please... i need help.

PS: Sorry for my caveman english...
 
Last edited:
Level 16
Joined
Oct 12, 2008
Messages
1,570
Triggering Unit is the one which triggers the trigger, in this case the one which casts the spell 'High Moon'
You first replace the triggerin unit (the one who casts) and then you kill it?
A trigger which kills itself? o_O
I think you mean (Picked Unit),, it means the unit you pick, so:
  • Unit Group - Pick every unit in (Units of Type Nightwolf) and do (Unit - Kill Picked Unit)
is probably what you mean ;)
 
Level 7
Joined
Oct 14, 2008
Messages
340
First of all instead of using <wolfmaster 0062>, use (Triggering unit)..
second of all, you're changing your night wolves to moon wolves, then killing night wolves... which there wouldn't be any left. Also, instead of using a Wait.. then killing the unit, you should use:
  • Unit - Add expiration timer
And finally.. Troll Wardlord is lame. :)
 
Level 16
Joined
Mar 8, 2009
Messages
975
thank you very much guys. I fix some errors, but i still have mayor bugs:
I dont know how to add a expiration time to a group. This is because when i cast the spell, only 1 wolf has expiration time.
I dont know how to do a ´good´ remove of the summon wolf spell. I remove it during the MoonWolves lives to avoid summons more wolves, but when the spell return, it does in lvl 1...

It is the new version of the spell, only lvl 1.

  • High Moon
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to HighMoon
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of HighMoon for (Trigering Unit)) Equal to 1
        • Then - Actions
          • Unit - Add Attack Bonus(+16) to (Triggering unit)
          • Unit Group - Pick every unit in (Units of type NightWolf) and do (Unit - Replace (Picked Unit) with a MoonWolf using The new unit´s max life and mana)
          • Unit - Add a 35.00 second Summoned Unit expiration timer to (Last replaced unit)
          • Wait 35.00 game-time seconds
          • Unit - Remove Attack Bonus(+16) from (Triggering unit)
        • Else - Actions
          • Don Nothing
An this is the trigger who says the limit of wolf spawn... i think... xD

  • No More Wolves
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to HighMoon
    • Actions
      • Unit - Remove Summon NightWolves from (Triggering Unit)
      • Wait 35.00 seconds
      • Unit - Add Summon NightWolves to (Triggering unit)
 
Level 16
Joined
Mar 8, 2009
Messages
975
Yes, I do It :grin:

Well, Finally i do it. This is the triggers. An its works :grin:

Thank You Very much guys, your help is best way to do good things, ... i think :xxd:


  • High Moon
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to HighMoon
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Level of HighMoon for (Trigering Unit)) Equal to 1
    • Then - Actions
      • Unit - Add Attack Bonus(+16) to (Triggering unit)
      • Unit Group - Pick every unit in (Units of type NightWolf) and do (Unit Replace (Picked Unit) with a MoonWolf using The new unit´s max life and mana)
      • Unit Group - Pick every unit in (Units of type MoonWolf) and do (Unit - Add a 20.00 second Summoned Unit expiration timer to (Picked Unit))
      • Wait 35.00 game-time seconds
      • Unit - Remove Attack Bonus(+16) from (Triggering unit)
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of HighMoon for (Trigering Unit)) Equal to 2
      • Then - Actions
        • Unit - Add Attack Bonus(+32) to (Triggering unit)
        • Unit Group - Pick every unit in (Units of type NightWolf) and do (Unit Replace (Picked Unit) with a MoonWolf using The new unit´s max life and mana)
        • Unit Group - Pick every unit in (Units of type MoonWolf) and do (Unit - Add a 20.00 second Summoned Unit expiration timer to (Picked Unit))
        • Wait 35.00 game-time seconds
        • Unit - Remove Attack Bonus(+32) from (Triggering unit)
    • Else - Actions
      • Do Nothing
Etc, etc, for the other levels is the same...

  • No More Wolves
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to HighMoon
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Summon NightWolves for (Trigering Unit)) Equal to 1
        • Then - Actions
          • Unit - Remove Summon NightWolves from (Triggering Unit)
          • Wait 35.00 seconds
          • Unit - Add Summon NightWolves to (Triggering unit)
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Summon NightWolves for (Trigering Unit)) Equal to 2
        • Then - Actions
          • Unit - Remove Summon NightWolves from (Triggering Unit)
          • Wait 35.00 seconds
          • Unit - Add Summon NightWolves to (Triggering unit)
          • Unit - Set level of Summon NightWolves for (Triggering unit) to 2
        • Else Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Summon NightWolves for (Trigering Unit)) Equal to 3
            • Then - Actions
              • Unit - Remove Summon NightWolves from (Triggering Unit)
              • Wait 35.00 seconds
              • Unit - Add Summon NightWolves to (Triggering unit)
              • Unit - Set level of Summon NightWolves for (Triggering unit) to 3
etc..


Thank u again guys. Bye.:thumbs_up:
 
Status
Not open for further replies.
Top