• 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.

[Trigger] What is wrong?

Status
Not open for further replies.
Level 11
Joined
Aug 11, 2009
Messages
605
I am trying to learn to make MUI spells and followed a guide (which made another spell than this, but I thought it might work about the same). Here is some info:

Spell Description:
The Mountain King slams the ground three times, damaging all nearby enemies every 0.5 sec.

Error:
It works the first cast, but second cast he only slams one time.

Code Init:
  • Spell 3 Multi Slam Init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Multi Slam (Melee)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MS_Index Equal to 0
        • Then - Actions
          • Trigger - Turn on Spell 3 Multi Slam Loop <gen>
        • Else - Actions
      • Set MS_MUI = (MS_MUI + 1)
      • Set MS_Index = (MS_Index + 1)
      • Set MS_TurnOn[MS_MUI] = True
      • Set MS_Damage[MS_MUI] = ((1.00 x (Real((Hero level of (Triggering unit))))) + (0.30 x (Real((Agility of (Triggering unit) (Include bonuses))))))
      • Set MS_Caster[MS_MUI] = (Triggering unit)
      • Animation - Change MS_Caster[MS_MUI]'s animation speed to 200.00% of its original speed
      • Animation - Play MS_Caster[MS_MUI]'s attack slam animation
Code Loop:
  • Spell 3 Multi Slam Loop
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • For each (Integer MS_Loop) from 1 to MS_MUI, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MS_TurnOn[MS_Loop] Equal to True
            • Then - Actions
              • Special Effect - Create a special effect attached to the origin of MS_Caster[MS_Loop] using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
              • Set UnitGroup[MS_Loop] = (Units within 300.00 of (Position of MS_Caster[MS_Loop]) matching (((Matching unit) belongs to an enemy of (Owner of MS_Caster[MS_Loop])) Equal to True))
              • Unit Group - Pick every unit in UnitGroup[MS_Loop] and do (Actions)
                • Loop - Actions
                  • Unit - Cause MS_Caster[MS_Loop] to damage (Picked unit), dealing MS_Damage[MS_Loop] damage of attack type Normal and damage type Normal
              • Custom script: call DestroyGroup (udg_UnitGroup[MS_Loop])
              • Set MS_Count[MS_Loop] = (MS_Count[MS_Loop] + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MS_Count[MS_Loop] Less than 3
                • Then - Actions
                  • Animation - Play MS_Caster[MS_Loop]'s attack slam animation
                • Else - Actions
                  • Set MS_Index = (MS_Index - 1)
                  • Animation - Change MS_Caster[MS_Loop]'s animation speed to 100.00% of its original speed
                  • Animation - Reset MS_Caster[MS_Loop]'s animation
                  • Set MS_Caster[MS_Loop] = No unit
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • MS_Index Equal to 0
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                      • Set MS_MUI = 0
                      • Set MS_Loop = 0
                    • Else - Actions
            • Else - Actions
+rep for any help on this :)

Edit: Sorry I saw now i didnt reset the MS_Count variable >.< this is Solved!
 
Level 3
Joined
Jan 31, 2012
Messages
26
poxa galerea to montando um mapinha de pokemon (é o meu primeiro XD) daí falta só alguns triggers pra terminar gostaria de ajuda expecialmente em um o fire blast do charizard.
siginte ele manda uma estrela de fogo na direção do alvo mas tipow essa estrela tem q ir na direção q a skill foi mirada (no target) daí tava querendo uma ajuda pra montar essa skill pq pow tentei de tudo mas num sai igual gostaria q alguem me mostrasse o trigger certo de como se faz se vc tiver alguma duvida a skill é exatamente igual (pura coincidencia) a do charizard no mapa pokemon game do EMoo pelo love de meu God to precisando mesmo galera da uma mão aew
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
Here is Google Translate's version:

hey galerea to riding a little map of pokemon (my first XD) then just missing some triggers to finish would help expecialmente in a blast of the fire charizard.
siginte he sends a star of fire toward the target but tipow this star has to go in the direction q qa skill was targeted (the target) then a tava wanting to help build this skill pq pow tried everything but in comes someone like me would like q show the trigger sure how to do it if you have any questions about the skill is exactly the same (pure coincidence) to map the charizard pokemon game for the thrill of my God to love it guys needing a hand of aew
 
Level 3
Joined
Jan 31, 2012
Messages
26
sorry that's because english and portuguese are almost the same thing for me so.. here goes

i'm almost finishing my first custom map YAY but i'm needing a little help here to create a custom spell
it's a fire star that is launched at the target (it's that kindda spell that you don't target a enemy or a area of effect you choose the direction it goes)(just like alleria arrows in DOTA) so
this fire star is launched at the enemy dealing 200 dmgsome bonus dmg depending the distance it goes until hit the target (it's not a homming missile) but i tryed everything and this skill Never works if you have any doubt about how this skill look's like take a look at a map created by Emoo called pokemon world there you will se a skill on charizad called fire blast
i want to reproduce that skill on my map whithout any change so if someone can help me i would be gratefull XD
 
Status
Not open for further replies.
Top