• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Spell Help

Status
Not open for further replies.
Level 19
Joined
Apr 10, 2010
Messages
2,789
Hello everyone,

Ive started trying to make spells. Now ive made three and copied them based off some other peoples spells. Now when I cast any of these 3 spells, nothing happens. Can anyone check whats wrong?


This launches rockets at a target direction.
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Rocket Blast
  • Actions
  • Set Rocket_Hero = (Casting unit)
  • Set Rocket_Point[0] = (Target point of ability being cast)
  • Set Rocket_Point[2] = (Position of Rocket_Hero)
  • Set Rocket_Aoe = 300.00
  • Set Rocket_Damage = (200.00 x (Real((Hero level of Rocket_Hero))))
  • Set Rocket_Group = (Units within Rocket_Aoe of Rocket_Point[0] matching (((Owner of (Matching unit)) Not equal to (Owner of Rocket_Hero)) and ((((Matching unit) is An Ancient) Not equal to True) and ((((Matching unit) belongs to an ally of (Owner of Rocket_Hero)) Not equal to True and ((((Matching unit) is A structure) Equal to True) and ((((Matching unit) is Magic Immune) Equal to True and ((((Matching unit) is Mechanical) Equal to True and ((((Matching unit) is Alive) Equal to True
  • For each (Integer A) from 1 to 30, do (Actions)
    • Loop - Actions
      • Set Rocket_Point[1] = (Rocket_Point[0] offset by (Random real number between 0.00 and 200.00) towards (Random angle) degrees)
      • Unit - Create 1 dummy for (Owner of Rocket_Hero) at Rocket_Point[2] facing Default building facing degrees
      • Special Effect - Create a special effect at Rocket_Point[2] using Abilities\Spells\Orc\MirrorImage\MirrorImageDeathCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Order (Last created unit) to Neutral Tinker - Cluster Rockets Rocket_Point[1]
      • Unit - Hide (Last created unit)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_Rocket_Point[1])
  • Unit Group - Pick every unit in Rocket_Group and do (Actions)
    • Loop - Actions
      • Unit - Cause Rocket_Hero to damage (Picked unit), dealing Rocket_Damage damage of attack type Spells and damage type Fire
      • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
      • Special Effect - Destroy (Last created special effect)
  • Custom script: call DestroyGroup(udg_Rocket_Group)
  • Custom script: call RemoveLocation(udg_Rocket_Point[0])
  • Custom script: call RemoveLocation(udg_Rocket_Point[2])



Fires flames at some directions.
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Flamethrower
  • Actions
  • Set Flame_Hero = (Casting unit)
  • Set Flame_Point[0] = (Position of Flame_Hero)
  • For each (Integer A) from 1 to 16, do (Actions)
    • Loop - Actions
      • Set Flame_Point[1] = (Flame_Point[0] offset by 1.00 towards (22.50 x (Real((Integer A)))) degrees)
      • Unit - Create 1 dummy for (Owner of Flame_Hero) at Flame_Point[0] facing Default building facing degrees
      • Unit - Hide (Last created unit)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire Flame_Point[1]
      • Special Effect - Create a special effect attached to the chest of (Picked unit) using Environment\LargeBuildingFire\LargeBuildingFire1.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_Flame_Point[1])
  • Custom script: call RemoveLocation(udg_Flame_Point[0])



Fires a bomb at a target location.
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Detonate
  • Actions
  • Set Bomb_Caster = (Triggering unit)
  • Set Bomb_Owner = (Owner of Bomb_Caster)
  • Set Bomb_Location = (Target point of ability being cast)
  • Set Bomb_AbilityLevel = (Level of (Ability being cast) for Bomb_Caster)
  • Set Bomb_Aoe = 200.00
  • Set Bomb_Damage = 350.00
  • Set Bomb_TotalDamage = (Bomb_Damage x (Real(Bomb_AbilityLevel)))
  • Set Bomb_Loop = 18
  • Set Bomb_DummyAbility = Detonate Missile
  • Set Bomb_DummyAbility2 = Detonate Explosion
  • Set Bomb_Group = (Units within Bomb_Aoe of Bomb_Location matching ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is A ground unit) Equal to True) and ((((Matching unit) is A flying unit) Equal to False) and ((((Matching unit) is alive) Equal to True and (((Owner of (Matching unit)) Not equal to (Owner of Bomb_Hero)) and ((((Matching unit) is An Ancient) Not equal to True) and ((((Matching unit) belongs to an ally of (Owner of Bomb_Hero))
  • For each (Integer A) from 1 to Bomb_Loop, do (Actions)
    • Loop - Actions
      • Set Bomb_LoopLocation = (Bomb_Location offset by 50.00 towards (360.00 x ((Real((Integer A))) / (Real(Bomb_Loop)))) degrees)
      • Unit - Create 1 dummy for Bomb_Owner at Bomb_Location facing Default building facing degrees
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Unit - Add Bomb_DummyAbility to (Last created unit)
      • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm Bomb_LoopLocation
      • Custom script: call RemoveLocation(udg_Bomb_LoopLocation)
  • Unit Group - Pick every unit in Bomb_Group and do (Actions)
    • Loop - Actions
      • Unit - Cause Bomb_Caster to damage (Picked unit), dealing Bomb_Damage damage of attack type Spells and damage type Fire
      • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at Bomb_Location using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
      • Special Effect - Destroy (Last created special effect)
  • Unit - Create 1 dummy for Bomb_Owner at Bomb_Location facing Default building facing degrees
  • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
  • Unit - Add Bomb_DummyAbility2 to (Last created unit)
  • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
  • Custom script: call DestroyGroup(udg_Bomb_Group)
  • Custom script: call RemoveLocation(udg_Bomb_Location)


Thanks:grin:
 
Level 6
Joined
Aug 1, 2009
Messages
159
So all of the triggers above don't work?

Use triggering unit instead of casting unit since it works better :p. Also check if the dummy unit have enough mana to cast the ability on what is being casted. Check if the dummy unit has the spell you ordered it to cast.
 
Trigger1) You damage your units with attack type Spells and Damage type Normal. In order for a unit to be damaged like this, it has to be anything but Magic Immune. So, this:
  • (Matching unit) is Magic Immune) Equal to True
must be set Equal to False.

What is more, you realize that your trigger will only damage buildings, right? It's because you have the
  • (Matching unit) is A structure) Equal to True)
If you want to damage everything but structures, set it to False; if you want to damage everything, along with structures, don't even add it.

Remember, you also have the

  • (Matching unit) is Mechanical) Equal to True
which damages everything that is classified as "Mechanical".

So, your trigger damages alive structures, with the classification of mechanical, that are magic immune and that belong to an enemy player. Is this what you wanted?

Finally, something to note;
if you have the condition
  • (((Matching unit) belongs to an ally of (Owner of Rocket_Hero)) Not equal to True)
This means that you will pick up every player, who is an enemy of the owner of your caster.
So, this condition:
  • (Owner of (Matching unit)) Not equal to (Owner of Rocket_Hero))
is redundant.

For the Cluster rocket part, I advise you to check how many rockets are created per second. I would also not hide the unit, because sometimes the effects aren't shown. I'd use no model in the Art - Model field.

Trigger2)
  • Special Effect - Create a special effect attached to the chest of (Picked unit) using Environment\LargeBuildingFire\LargeBuildingFire1.mdl
    • Special Effect - Destroy (Last created special effect)
You realize that the (Picked unit) you are referring to doesn't exist; you made no Unit Group - Pick every unit action for the Picked unit to be a valid response.
To change this, go to the ability, in the object editor, and change the field Art - Target.

Your ability creates a circle of effects, but you spawn the dummy units at the position of your hero; spawn them instead at the Flame_Point[1]. What is more, increase the offset; 1.00 is rediculous.
Again, don't hide the unit.

Trigger3)
  • ((((Matching unit) is A ground unit) Equal to True) and ((((Matching unit) is A flying unit) Equal to False)
You make a check if the unit is ground and then you make another check to count non-flying units. Your second one is obviously redundant. Your first check makes exactly what your second does.

  • Set Bomb_LoopLocation = (Bomb_Location offset by 50.00 towards (360.00 x ((Real((Integer A))) / (Real(Bomb_Loop)))) degrees)
This should be:
  • Set Bomb_LoopLocation = (Bomb_Location offset by 50.00 towards (360.00 x ((Real((Integer A))) degrees)


That's all; make sure every dummy has enough mana to cast the abilities given or.. even better check if the mana required for the abilities (Stats - Mana Cost) is 0.
 
Status
Not open for further replies.
Top