• 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] Volcano spell

Status
Not open for further replies.
Level 10
Joined
Aug 2, 2008
Messages
374
Ok, im working on volcano spell. It attacks enemies in a certain region and sends volcano meteors down spawning lava spawn. The snag ive run into is when I do
  • Actions: Unit Group - Pick every unit in (Units in TempRegion matching (((Unit-type of (Picked unit)) Equal to Firelord) and (((Triggering unit) is A Hero) Equal to True))) and do (Actions)
    • Loop - Actions
      • Unit - Cause (Triggering unit) to damage circular area after 2.00 seconds of radius 400.00 at (Center of TempRegion), dealing 50.00 damage of attack type Spells and damage type Normal
      • Special Effect - Create a special effect at (Center of spawnregion1) using Units\Demon\Infernal\InfernalBirth.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Create (Random integer number between 1 and 1) Lava Spawn (Level 3) for (Triggering player) at (Center of spawnregion1) facing Default building facing degrees
      • Special Effect - Create a special effect at (Random point in spawnregion2) using Units\Demon\Infernal\InfernalBirth.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Create (Random integer number between 1 and 1) Lava Spawn (Level 3) for (Triggering player) at (Center of spawnregion2) facing Default building facing degrees
      • Special Effect - Create a special effect at (Random point in spawnregion3) using Units\Demon\Infernal\InfernalBirth.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Create (Random integer number between 1 and 1) Lava Spawn (Level 3) for (Triggering player) at (Center of spawnregion3) facing Default building facing degrees
      • Special Effect - Create a special effect at (Random point in spawnregion4) using Units\Demon\Infernal\InfernalBirth.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Create (Random integer number between 1 and 1) Lava Spawn (Level 3) for (Triggering player) at (Center of spawnregion4) facing Default building facing degrees
It doesnt work unless i change unit type firelord to all units and then it makes lava spawn for every unit in the tempregion.
If someone can tell me how to get this to work, itd be helpful.
 
(Units in TempRegion matching (((Unit-type of (Picked unit))
Should be:
(Units in TempRegion matching (((Unit-type of (Matching unit))

Dunno if that's your bug, though.

EDIT: And I also don't understand why you are using "Unit group - Pick every unit in..." when you don't use (Picked unit) at all..?
And I don't think you can use (Triggering player) when there's not a triggering player, just a triggering unit..
 
Status
Not open for further replies.
Top