• 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] need help! My Spells!

Status
Not open for further replies.
Level 4
Joined
Nov 4, 2013
Messages
33
Request for help!
The following Waveform spells, Dash of Storm, is where I need your help
I use them on my map, it's a problem that 'can not support 12 people at the same time to use it.'
In this issue makes me irritable, make sure gurus to help me.
My trigger is as follows:
  • Wave Form 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Waveform
    • Actions
      • Set WF_Caster = (Triggering unit)
      • Set WF_Caster_Loc = (Position of WF_Caster)
      • Set WF_Point = (Target point of ability being cast)
      • Set WF_Angle = (Angle from WF_Caster_Loc to WF_Point)
      • Set WF_Distance = (Distance between WF_Caster_Loc and WF_Point)
      • Set WF_Check = False
      • Unit - Turn collision for WF_Caster Off
      • Custom script: call RemoveLocation (udg_WF_Caster_Loc)
      • Trigger - Turn on Wave Form Action Copy <gen>
      • Wait until (WF_Check Equal to True), checking every 0.10 seconds
      • Selection - Select WF_Caster for (Owner of WF_Caster)
      • Unit - Turn collision for WF_Caster On
      • Trigger - Turn off Wave Form Action Copy <gen>
      • Custom script: call RemoveLocation (udg_WF_Point)

  • Wave Form Action Copy
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set WF_Caster_Loc = (Position of WF_Caster)
      • Set WF_Offset = (WF_Caster_Loc offset by 27.00 towards WF_Angle degrees)
      • Set WF_Distance = (Distance between WF_Caster_Loc and WF_Point)
      • Unit - Move WF_Caster instantly to WF_Offset, facing WF_Angle degrees
      • Special Effect - Create a special effect at WF_Caster_Loc using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 165.00 of WF_Caster_Loc matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of WF_Caster)) Equal to True)))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is in WF_Group) Not equal to True
            • Then - Actions
              • Unit Group - Add (Picked unit) to WF_Group
              • Unit - Cause WF_Caster to damage (Picked unit), dealing 150.00 damage of attack type Spells and damage type Universal
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WF_Distance Less than or equal to 50.00
        • Then - Actions
          • Set WF_Check = True
          • Animation - Play WF_Caster's birth animation
          • Unit Group - Remove all units from WF_Group
          • Trigger - Turn off (This trigger)
        • Else - Actions
      • Custom script: call RemoveLocation (udg_WF_Caster_Loc)
      • Custom script: call RemoveLocation (udg_WF_Offset)

Next----


  • Dash of Storm Init
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Dash of Storm
    • Actions
      • -------- ######################### --------
      • Wait until ((Ability being cast) Equal to Dash of Storm ), checking every 0.10 seconds
      • -------- ######################### --------
      • -------- ### --- HashTable --- ### --------
      • Hashtable - Create a hashtable
      • Set HashTable[4] = (Last created hashtable)
      • -------- ######################### --------
      • -------- ### --- Salvando a Unidade" --- ### --------
      • Hashtable - Save Handle Of(Triggering unit) as 1 of (Key (Triggering unit)) in HashTable[4]
      • -------- ### --- Configure Algumas Variaveis --- ### --------
      • -------- Unidade (Warrior): --------
      • Set Unit[7] = (Load 1 of (Key (Triggering unit)) in HashTable[4])
      • -------- ######################### --------
      • -------- ### --- Collision Off --- ### --------
      • Unit - Turn collision for Unit[7] Off
      • -------- ######################### --------
      • Trigger - Turn on Dash of Storm Loop <gen>
      • -------- ######################### --------
      • Wait 0.50 seconds
      • -------- ######################### --------
      • -------- ### --- Animation --- ### --------
      • Custom script: call ResetUnitAnimation( udg_Unit[7] )
      • -------- ######################### --------
      • -------- ### --- Collision On --- ### --------
      • Unit - Turn collision for Unit[7] On
      • -------- ######################### --------
      • -------- ### --- Clear The HashTable --- ### --------
      • Custom script: call FlushParentHashtableBJ( udg_HashTable[4] )
      • -------- ######################### --------
      • -------- ## --- Desconfigurando as Variáveis --- ### --------
      • Set Unit[7] = No unit
      • Trigger - Turn off Dash of Storm Loop <gen>
      • -------- ######################### --------

  • Dash of Storm Loop
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • -------- ######################### --------
      • -------- ### --- Configurando Algumas Variáveis --- ### --------
      • -------- Velocidade para Mover as Unidades Pegadas: --------
      • Set Integer[3] = (Integer[3] + 32)
      • -------- Velocidade de Movimentação do Guerreiro: --------
      • Set Integer[4] = (Integer[4] + 22)
      • -------- Posição do Guerreiro: --------
      • Set ABI_Point_Position[6] = (Position of Unit[7])
      • -------- Grupo: --------
      • Set ABI_Unit_Group[6] = (Units within 165.00 of ABI_Point_Position[6] matching ((((Matching unit) is A structure) Equal to False) or (((Matching unit) is Resistant) Equal to False)))
      • -------- Efeito Especial Causado na Unidade Pegada: --------
      • Set String[7] =
      • -------- Para Animação de Giro do Unit(7) (Warrior): --------
      • Set String[8] = Attack Walk Stand Spin
      • -------- Tipo de Ataque: --------
      • Set Attack_Type[7] = Hero
      • -------- Tipo de Dano: --------
      • Set Damage_Type[13] = Force
      • -------- Configura Aqui o Dano Causado na Unidade Pegada: --------
      • Set Real_ABI_Damage[6] = 7.00
      • Set String[11] = Objects\Spawnmodels\Other\IllidanFootprint\IllidanWaterSpawnFootPrint.mdl
      • -------- ######################### --------
      • -------- ### --- Dash --- ### --------
      • Custom script: call SetUnitAnimation( udg_Unit[7], udg_String[8] )
      • Custom script: call SetUnitPositionLoc( udg_Unit[7], PolarProjectionBJ(GetUnitLoc(udg_Unit[7]), I2R(udg_Integer[4]), GetUnitFacing(udg_Unit[7])) )
      • -------- ######################### --------
      • Special Effect - Create a special effect at ABI_Point_Position[6] using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- Destruindo Destructibles: --------
      • Destructible - Pick every destructible within 165.00 of ABI_Point_Position[6] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked destructible) is alive) Equal to True
            • Then - Actions
              • -------- ######################### --------
              • -------- ### --- Special Effect --- ### --------
              • Custom script: call AddSpecialEffectLocBJ( GetDestructableLoc(GetEnumDestructable()), udg_String[11] )
              • Custom script: call DestroyEffectBJ( GetLastCreatedEffectBJ() )
              • -------- ######################### --------
              • -------- ### --- Destrua as Destructibles --- ### --------
              • Custom script: call KillDestructable( GetEnumDestructable() )
              • -------- ######################### --------
            • Else - Actions
      • Unit Group - Pick every unit in ABI_Unit_Group[6] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of Unit[7])) Equal to True
              • ((Picked unit) is dead) Equal to False
              • ((Picked unit) is A structure) Equal to False
              • ((Picked unit) is Magic Immune) Equal to False
              • ((Picked unit) is A flying unit) Equal to False
              • ((Picked unit) is Mechanical) Equal to False
              • ((Picked unit) is A town-hall-type unit) Equal to False
              • (Picked unit) Not equal to Unit[7]
            • Then - Actions
              • -------- ######################### --------
              • -------- ### --- Dano Causado Na Unidade Pegada --- ### --------
              • Custom script: call UnitDamageTargetBJ( udg_Unit[7], GetEnumUnit(), udg_Real_ABI_Damage[6], udg_Attack_Type[7], udg_Damage_Type[13] )
              • -------- ######################### --------
              • -------- ### --- KnockBack --- ### --------
              • Custom script: call SetUnitPositionLoc( GetEnumUnit(), PolarProjectionBJ(GetUnitLoc(GetEnumUnit()), I2R(udg_Integer[3]), AngleBetweenPoints(udg_ABI_Point_Position[6], GetUnitLoc(GetEnumUnit()))) )
              • -------- ######################### --------
              • -------- ### --- Special Effect --- ### --------
              • Custom script: call AddSpecialEffectTargetUnitBJ( "origin", GetEnumUnit(), udg_String[7] )
              • Custom script: call DestroyEffectBJ( GetLastCreatedEffectBJ() )
              • -------- ######################### --------
              • Destructible - Pick every destructible within 165.00 of (Position of (Picked unit)) and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked destructible) is alive) Equal to True
                    • Then - Actions
                      • -------- ######################### --------
                      • -------- ### --- Special Effect --- ### --------
                      • Custom script: call AddSpecialEffectLocBJ( GetDestructableLoc(GetEnumDestructable()), udg_String[11] )
                      • Custom script: call DestroyEffectBJ( GetLastCreatedEffectBJ() )
                      • -------- ######################### --------
                      • -------- ### --- Destrua as Destructibles --- ### --------
                      • Custom script: call KillDestructable( GetEnumDestructable() )
                      • -------- ######################### --------
                    • Else - Actions
            • Else - Actions
      • -------- ######################### --------
      • -------- ### --- Configure os Integers (3 e 4) = 0 (Não Removas Estas triggers,Pois Causará Erros) --- ### --------
      • Set Integer[3] = 0
      • Set Integer[4] = 0
      • -------- ######################### --------
      • -------- ### --- Removendo a(s) Posição/Posições e o Destruindo o(s) Grupo(s) --- ### --------
      • Custom script: call RemoveLocation (udg_ABI_Point_Position[6])
      • Custom script: call DestroyGroup(udg_ABI_Unit_Group[6])
      • -------- ######################### --------
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
You will need to change most of the variable you use into arrays (that's done by checking the "array" box when you create/edit variable) - for everything that is saved longer than 1 trigger run, so e.g. the caster, etc.

If the spell can be used by 1 unit per 1 player at a time (and the unit cannot cast the spell again if it casted it previously and that spell is still active), then you will need to make your system MPI (= multi player instancible) which means that you will save data under player indexes (there's a function for integer "Player - Player's number" which returns integer number and that number is unique for each player). This player number is used as the Index number for the variable.

Also, please edit your post and put the other triggers into [ TRIGGER ] tags as well (also, use the [ HIDDEN=xy ] [ /HIDDEN ] tags - without space in the tags - to hide those triggers).
 
Status
Not open for further replies.
Top