• 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] Spells issues

Status
Not open for further replies.
Level 7
Joined
Oct 10, 2009
Messages
111
Spell1
  • Life Leech
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Life Leech
    • Actions
      • Set LL_caster_target[0] = (Casting unit)
      • Set LL_caster_target[1] = (Target unit of ability being cast)
      • Set LL_damage_heal[0] = (80 + (Intelligence of LL_caster_target[0] (Include bonuses)))
      • Set LL_damage_heal[1] = (40 + (Intelligence of LL_caster_target[0] (Include bonuses)))
      • Set LL_points[0] = (Position of LL_caster_target[0])
      • Set LL_points[1] = (Position of LL_caster_target[1])
      • Trigger - Run Life Leech loop <gen> (checking conditions)

  • Life Leech loop
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
      • (LL_caster_target[1] is alive) Equal to True
    • Actions
      • Special Effect - Create a special effect at LL_points[1] using Abilities\Spells\Undead\CarrionSwarm\CarrionSwarmDamage.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at LL_points[0] using Abilities\Spells\Items\AIem\AIemTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Cause LL_caster_target[0] to damage LL_caster_target[1], dealing (Real(LL_damage_heal[0])) damage of attack type Spells and damage type Normal
      • Unit - Set life of LL_caster_target[0] to ((Life of LL_caster_target[0]) + (Real(LL_damage_heal[1])))
      • Custom script: call RemoveLocation(udg_LL_points[0])
      • Custom script: call RemoveLocation(udg_LL_points[1])


This spell is based on "Life drain" spell. The issue is that it cannot target any sort of units (enemy, friendly, netural ...). it remained the same in the object editor as it's original "Life drain" ability. Any ideas how to fix it?

Spell 2:

  • Burning cataclysm int
    • Events
      • Map initialization
    • Conditions
      • (Ability being cast) Equal to Burning Cataclysm
    • Actions
      • -------- Setting basic Variables --------
      • Set BC_Caster = (Casting unit)
      • Set BC_BaseRadius = 650.00
      • Set BC_Angles[0] = 35.00
      • Set BC_Angles[1] = 60.00
      • Set BC_Angles[2] = 90.00
      • Set BC_Angles[3] = 150.00
      • Set BC_Angles[4] = 180.00
      • Set BC_Angles[5] = 240.00
      • Set BC_Angles[6] = 300.00
      • Set BC_Angles[7] = 359.00
      • Set BC_points[0] = (Target point of ability being cast)
      • Set BC_points[1] = ((Target point of ability being cast) offset by (BC_Distance, BC_Angles[1]))
      • Set BC_points[2] = (BC_points[1] offset by (BC_Distance, BC_Angles[2]))
      • Set BC_points[3] = (BC_points[2] offset by (BC_Distance, BC_Angles[3]))
      • Set BC_points[4] = (BC_points[3] offset by (BC_Distance, BC_Angles[4]))
      • Set BC_points[5] = (BC_points[4] offset by (BC_Distance, BC_Angles[5]))
      • Set BC_points[6] = (BC_points[5] offset by (BC_Distance, BC_Angles[6]))
      • Set BC_points[7] = (BC_points[6] offset by (BC_Distance, BC_Angles[7]))
      • Set BC_Distance = 150.00
      • Set BC_damage = (110 + (Intelligence of BC_Caster (Include bonuses)))


  • Burning cataclysm loop
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Burning Cataclysm
    • Actions
      • Set BC_Caster = (Triggering unit)
      • Set BC_points[0] = (Target point of ability being cast)
      • Unit - Create 1 bcata_dummy for Player 1 (Red) at BC_points[0] facing Default building facing degrees
      • Set BC_dummy2[0] = (Last created unit)
      • For each (Integer A) from 0 to (Integer(BC_Distance)), do (Actions)
        • Loop - Actions
          • Set BC_Angles[0] = ((Real((Integer A))) x BC_Distance)
          • Set BC_points[1] = (BC_points[0] offset by BC_BaseRadius towards BC_Angles[0] degrees)
          • Unit - Create 1 bcata_dummy for (Owner of BC_Caster) at BC_points[1] facing Default building facing degrees
          • Set BC_dummy2[(Integer A)] = (Last created unit)
          • Special Effect - Create a special effect attached to the origin of BC_dummy_Destroy[(Integer A)] using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
          • Set BC_sfx_store[0] = (Last created special effect)
          • Custom script: call RemoveLocation(udg_BC_points[1])
          • -------- If you want your spell to deal damage to more groups, you'll have to create line for each group or use Integer[A] for Unit Group variable. Below are just examples. --------
          • Set BC_unit_groups[2] = (Units in (Region centered at BC_points[(Integer A)] with size (650.00, 650.00)) owned by Neutral Hostile)
          • Set BC_unit_groups[3] = (Units in (Region centered at BC_points[(Integer A)] with size (650.00, 650.00)) owned by Player 2 (Blue))
          • Set BC_unit_groups[4] = (Units in (Region centered at BC_points[(Integer A)] with size (650.00, 650.00)) owned by Player 3 (Teal))
          • Unit Group - Pick every unit in BC_unit_groups[(Integer A)] and do (Actions)
            • Loop - Actions
              • Unit - Cause BC_Caster to damage (Picked unit), dealing (Real(BC_damage)) damage of attack type Spells and damage type Fire
              • Special Effect - Create a special effect at BC_points[0] using Abilities\Spells\Items\AIfb\AIfbTarget.mdl
              • Set BC_sfx_store[2] = (Last created special effect)
      • For each (Integer A) from 0 to 2, do (Actions)
        • Loop - Actions
          • Special Effect - Destroy BC_sfx_store[(Integer A)]
          • Unit - Remove BC_dummy2[(Integer A)] from the game


The spell is based on the "Thunder clap" ablity. Issue? It does nothing :)
I hope you guys can help me with at least one of these spells. Tnx :)
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
If you can't target any unit, it's because you have to configure the "Availble Targets" for the ability and for the casting unit. Using "Air / Ground" should be enough to select most units.

What do you exactly want to achieve with each one of these abilities? Describe them. I'm pretty sure they can be coded in a lot easier and efficient way than you did. I would even be available to create them for you if you give me a really good explanation about what you want.
 
Level 7
Joined
Oct 10, 2009
Messages
111
If you can't target any unit, it's because you have to configure the "Availble Targets" for the ability and for the casting unit. Using "Air / Ground" should be enough to select most units.

What do you exactly want to achieve with each one of these abilities? Describe them. I'm pretty sure they can be coded in a lot easier and efficient way than you did. I would even be available to create them for you if you give me a really good explanation about what you want.

First spell:

What I basically want is the modified Life drain spell. Everything basically the same except the damage scales off of caster's intelligence rather than the flat damage/healing (as you can see in the damage/leech variables).

Second spell:

The main idea for the spell is to be a extended flame strike. That is, one initial flame strike creates another one at the target point of created dummy and so in the distance of 650 (which is defined) of the original casting position (and dummies are positioned by angles). I'm aware that there probably is the easier way to do so, but I'm quite a new to the dummy usage in abilities so it's still rather confusing to use them.
I'll be really thankful if you could help me :)
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
the first one will work only once per cast because you dont run the loop trigger every 0,5 seconds but you run it once using function Run Trigger (aa) (checking condition)
also burning cataclism, why do you set variables at map init, for instance your BC_damage will not change when your unit gains any inteligence.
You should set:
  • Set BC_points[1] = ((Target point of ability being cast) offset by (BC_Distance, BC_Angles[1]))
  • Set BC_points[0] = (Target point of ability being cast)
  • Set BC_damage = (110 + (Intelligence of BC_Caster (Include bonuses)))
The reason being is that all of those functions returns null with map init event.
Also the condition in trigger Burning cataclysm int
  • (Ability being cast) Equal to Burning Cataclysm
is useless, how can you cast something on map init? :D
 
Status
Not open for further replies.
Top