• 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] Quick question

Status
Not open for further replies.
Level 10
Joined
Sep 6, 2007
Messages
440
Ok, I made a regeneration ability which is added to the caster unit after the casts the spell. The problem is I have problems on making it MUI and when 2 person casts it, the ability isn't removed! Helps
  • Charge
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Lightning Fury
    • Actions
      • Custom script: local unit udg_Caster
      • Custom script: local effect udg_AEffect
      • Set Caster = (Casting unit)
      • Set Pos1 = (Position of Caster)
      • Set AGroup2 = (Units within 300.00 of Pos1 matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of Caster)) Equal to True) and (((Matching unit) is A structure) Equal to False))))
      • Unit - Add HP REGEN to Caster
      • Set HpRegen = HP REGEN
      • Unit - Set level of HpRegen for Caster to (Level of Lightning Fury for Caster)
      • Special Effect - Create a special effect attached to the chest of Caster using Abilities\Spells\Orc\Purge\PurgeBuffTarget.mdl
      • Set AEffect = (Last created special effect)
      • Unit Group - Pick every unit in AGroup2 and do (Actions)
        • Loop - Actions
          • Unit - Cause Caster to damage (Picked unit), dealing ((Real((Intelligence of Caster (Include bonuses)))) x (Real((Level of Lightning Fury for Caster)))) damage of attack type Spells and damage type Lightning
          • -------- This is where the damage is dealt. You can edit it by changing the properties of Arithmetic. --------
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\ManaFlare\ManaFlareBoltImpact.mdl
      • Wait ((Real((Level of Lightning Fury for Caster))) x 2.00) seconds
      • Unit - Remove HpRegen from Caster
      • Special Effect - Destroy AEffect
      • Custom script: call DestroyGroup(udg_AGroup2)
      • Custom script: call RemoveLocation(udg_Pos1)
 
Level 4
Joined
Mar 15, 2008
Messages
71
here's an idea...
make every variable an array... problem solved

  • Charge
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Lightning Fury
    • Actions
  • Custom script: local unit udg_Caster
  • Custom script: local effect udg_AEffect
  • Set Caster[Player - Number of (Owner of (Casting Unit))] = (Casting unit)
  • Set Pos1[COLOR="Cyan"][Player - Number of (Owner of (Casting Unit))][/COLOR] = (Position of Caster)
  • Set AGroup2[COLOR="Cyan"][Player - Number of (Owner of (Casting Unit))][/COLOR] = (Units within 300.00 of Pos1[COLOR="Cyan"][Player - Number of (Owner of (Casting Unit))][/COLOR] matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of Caster)) Equal to True) and (((Matching unit) is A structure) Equal to False))))
  • Unit - Add HP REGEN to Caster[COLOR="Cyan"][Player - Number of (Owner of (Casting Unit))][/COLOR]
  • Set HpRegen[COLOR="Cyan"][Player - Number of (Owner of (Casting Unit))][/COLOR] = HP REGEN
  • Unit - Set level of HpRegen[COLOR="Cyan"][Player - Number of (Owner of (Casting Unit))][/COLOR] for Caster[COLOR="Cyan"][Player - Number of (Owner of (Casting Unit))][/COLOR] to (Level of Lightning Fury for Caster[COLOR="Cyan"][Player - Number of (Owner of (Casting Unit))][/COLOR])
  • Special Effect - Create a special effect attached to the chest of Caster[COLOR="Cyan"][Player - Number of (Owner of (Casting Unit))][/COLOR] using Abilities\Spells\Orc\Purge\PurgeBuffTarget.mdl
  • Set AEffect[COLOR="Cyan"][Player - Number of (Owner of (Casting Unit))][/COLOR] = (Last created special effect)
  • Unit Group - Pick every unit in AGroup2[COLOR="Cyan"][Player - Number of (Owner of (Casting Unit))][/COLOR] and do (Actions)
  • Loop - Actions
  • Unit - Cause Caster[COLOR="Cyan"][Player - Number of (Owner of (Casting Unit))][/COLOR] to damage (Picked unit), dealing ((Real((Intelligence of Caster[COLOR="Cyan"][Player - Number of (Owner of (Casting Unit))][/COLOR] (Include bonuses)))) x (Real((Level of Lightning Fury for Caster)))) damage of attack type Spells and damage type Lightning
  • -------- This is where the damage is dealt. You can edit it by changing the properties of Arithmetic. --------
  • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\ManaFlare\ManaFlareBoltImpact.mdl
  • Wait ((Real((Level of Lightning Fury for Caster[COLOR="Cyan"][Player - Number of (Owner of (Casting Unit))][/COLOR]))) x 2.00) seconds
  • Unit - Remove HpRegen[COLOR="Cyan"][Player - Number of (Owner of (Casting Unit))][/COLOR] from Caster[COLOR="Cyan"][Player - Number of (Owner of (Casting Unit))][/COLOR]
  • Special Effect - Destroy AEffect[COLOR="Cyan"][Player - Number of (Owner of (Casting Unit))][/COLOR]
  • Custom script: call DestroyGroup(udg_AGroup2)
  • Custom script: call RemoveLocation(udg_Pos1)
**I thought I could color the text inside a trigger format but I guess I was wrong...too lazy to remove the [color] tags now...
 
Last edited:
Status
Not open for further replies.
Top