• 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] Make units

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
  • spawn
    • Events
    • Conditions
    • Actions
      • Unit - Create GD_Number Banshee for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
is there anyway to target those and make them invulneable

becuase it looks really weird to do like this

  • Cast GD
    • Events
    • Conditions
    • Actions
      • Unit - Create 1 Banshee for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Unit - Make (Last created unit) Invulnerable
      • Unit - Create 1 Banshee for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Unit - Make (Last created unit) Invulnerable
      • Unit - Create 1 Banshee for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Unit - Make (Last created unit) Invulnerable
 
If you use multiple 'Unit - Create' actions and units share unit-type loops prove to be usefull here:

  • Cast GD
    • Events
    • Conditions
    • Actions
      • Set p = (Center of (Playable map area))
      • For each (Integer i) from 1 to 3 do Actions
        • Loop - Actions
          • Unit - Create 1 Banshee for Player 1 (Red) at p facing Default building facing degrees
          • Unit - Make (Last created unit) Invulnerable
      • Custom script: call RemoveLocation(udg_p)
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
thats exactly what i wanted thanks spinnaker
rep+

i got a question more then. will this work or it might bugg?

EDIT (oh dam dubble post sorry)

  • GD cast
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Big Bad Voodoo
    • Actions
      • Set GD_ability[(Player number of (Owner of (Casting unit)))] = (Ability being cast)
      • Special Effect - Create a special effect attached to the origin of (Casting unit) using GD_Effects[1]
      • For each (Integer B) from 1 to GD_Number, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Summoned ghost for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
          • Set GD_summoned_unit[(Integer B)] = (Last created unit)
          • Unit - Set (Last created unit) movement speed to 150.00
          • Unit - Make (Last created unit) Invulnerable
 
Last edited by a moderator:
Status
Not open for further replies.
Top