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

Create a dummy with out having to cast

Status
Not open for further replies.
Level 3
Joined
Aug 25, 2009
Messages
18
Trying to make it so that if a hero has a specific ability (lets say critical that cant go off and has a 0% chance of happening) that hero will create a random unit for the matching player in a random region. Im pretty sure I can do the random spawn thing, just not how to make the units spawn periodically. Thanks
 
Level 3
Joined
Aug 25, 2009
Messages
18
Every 2 seconds its gonna create a unit(dummy) in a random spot in a region that will war stomp with a 50 radius. Just wanna tie it to a skill so it can be seen as having that ability. If someone was able to write a trigger that would make it happen with in a 400 radius of the hero, that would be better but I can't figure out the math part to do that.

So basically I wanna create a unit every 2 seconds either in a 400 radius of the hero or just make it in a region, which ever is easier.
 
Level 5
Joined
Jul 14, 2008
Messages
121
Made the triggers for you:

  • Spell Trigger 1
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to [Your Spell]
    • Actions
      • Set SpellCaster = (Learning Hero)
      • Trigger - Turn on Spell Trigger 2 <gen>
      • Trigger - Turn off (This trigger)
  • Spell Trigger 2
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Set SpellLoc = ((Position of SpellCaster) offset by (Random real number between 0.00 and 400.00) towards (Random angle) degrees)
      • Unit - Create 1 [Your Dummy] for (Owner of SpellCaster) at SpellLoc facing Default building facing degrees
      • Unit - Set level of [Your Dummy Spell] for (Last created unit) to (Level of [Your Spell] for SpellCaster)
      • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_SpellLoc)
Hope it work like you wanted.
 
Level 11
Joined
May 31, 2008
Messages
698
That will only work if there is only one hero in the map that can learn that ability. I would add the leraning hero to a group and every 2 seconds pick all units in that group and then do pretty much use the actions from Dvoth's second trigger, but in the unit group loop.
 
Status
Not open for further replies.
Top