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

[Trigger] Make units

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
  • 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
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
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,183
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