• 🏆 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!

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 24
Joined
Feb 9, 2009
Messages
1,787
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