• 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.

custom spell where a villager turns into something else

Status
Not open for further replies.
Level 2
Joined
Mar 1, 2019
Messages
12
So I'm doing this kind of trigger where I used the "Summoning Ritual" spell by the Naga Summoner as a dummy spell.
I'll use this trigger to do stuff
militia.png


At first, everything is going as planned, but when I added the Spearman and Apprentice Wizard spells, instead of summoning that 1 unit, it summoned all of them.
Pwease help :)
 
Level 25
Joined
Feb 9, 2009
Messages
1,801
Highly recommend cruising through this tutorial.

Use some variables to get some randomness or use the condition for random integer/real:
  • Summon
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Summoning Ritual
    • Actions
      • Set VariableSet LocationVariable[1] = (Position of (Triggering unit))
      • Set VariableSet IntegerVariable = (Random integer number between 1 and 3)
      • Set VariableSet UnitType[1] = Footman
      • Set VariableSet UnitType[2] = Rifleman
      • Set VariableSet UnitType[3] = Priest
      • Unit - Create 1 UnitType[IntegerVariable] for (Owner of (Triggering unit)) at LocationVariable[1] facing (Facing of (Triggering unit)) degrees
      • Unit - Remove (Triggering unit) from the game
      • Custom script: call RemoveLocation(udg_LocationVariable[1])
 
Status
Not open for further replies.
Top