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

[Spell] Summoning hostile units

Status
Not open for further replies.
Level 1
Joined
Jul 15, 2020
Messages
2
Hi, could someone please help me debugging this:
upload_2020-7-15_2-44-45.png


The intention is to utilise a summoning spell to spawn random hostile creeps. Or is there an alternative way?
 
Level 25
Joined
Mar 29, 2020
Messages
1,465
if the ability "dark portal (Training altar)" is an "instant" type ability (like summon bear - where you just click on the ability and it works without having to select a point or unit you want it to happen at [like flame strike/storm bolt] )
then you need to select units within 100 of triggering unit.

also you are leaking a point and a unit group. if you want to avoid that (which you should), you need to first set the point = point of triggering unit, set the unit group = all units within 100 range of point, and only then use the function you used, with the variables in it. afterwards remove the points. notice that this will also affect any other units who happen to be in range...


alternatively, you could just have the whole ability be triggered, and directly create the units for the player you want to have them.

however, if the ability is just a regular summoning type ability, this is probably the simplest way to go:
  • create units using the ability
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to "training altar"
    • Actions
      • Unit - Change ownership of (Summoned unit) to Neutral Hostile and Change color
 
Last edited:
Level 1
Joined
Jul 15, 2020
Messages
2
Summoned unit trigger is what I have tried initially, but that does not work for some reason. As the Dark Portal has randomness of a spawn already implemented, I thought it should be much easier than creating a massive trigger, thus a "clever" workaround, but that also had no effect.

While typing I thought that it was perhaps a problem with the syntax and it actually was!!!:sad:
Putting a summoning unit instead of triggering unit worked:

upload_2020-7-16_14-55-7.png


Thanks guys!
 
Status
Not open for further replies.
Top