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

Dummy Units Tutorial

Level 8
Joined
Jul 3, 2004
Messages
334
THE USES OF DUMMY UNITS


Requirements:
World Editor
Knowledge of Triggers
Knowledge of the Object Editor


A Quick Overview:
Dummy units. You hear about them at almost every Warcraft III site. What are they? A dummy unit is a unit with one or more purposes and is not used for fighting\building\other work. A dummy unit is basically a unit that is invulnerable, non-selectable, scaled to the lowest size possible(usually), and hidden. These small helpers serve as the building blocks for most great spells. They can be used for many purposes including: lightning from one point to a dummy unit, moving units from one place to a dummy unit, special effects at a dummy unit, and much, much more. What do all of these have in common? There is no region used for the target point. This can cut down on region variables and regions themselves. In the next section, you will learn how to use dummy units.


Their Uses:
Here is what we will do:

Step #1: Go to the object editor and to the units tab. Create a new unit based of of the Headhunter and name it "Dummy".

Step #2: Set attacks enabled: Attack 1 only (unless already set to that), delete all abilities, set food used 0, upgrades used: none, and cooldown to 5.00 seconds.

Step #3: Change its damage to 29, Damage - Number of Dice: 1, Damage - Sides per Dice: 1. Give him the abilities "Invulnerable (Neutral)" and "Locust".

SIDENOTE: Locust makes a unit unselectable in-game.

Step #4: Create a unit based off of Siege Engine and name it "Spear Launcher". Change ONLY the attacks enabled to NONE.

Step #5: Place a Spear Launcher and some test enemies on the map. Don't forget the Start Location.

Step #6: Go to the triggers and delete the Map Initialization trigger and make one called "Launch Spears". Use this trigger syntax:

Code:
Launch Spears
    Events
        Time - Every 1.50 seconds of game time
    Conditions
    Actions
        Unit - Create 1 Dummy for (Owner of Spear Launcher 0000 <gen>) at (Position of Spear Launcher 0000 <gen>) facing Default building facing degrees
        Animation - Change (Last created unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
        Wait 1.50 seconds
        Unit - Remove (Last created unit) from the game

Now, test the map. Take the Spear Launcher over to your enemies on the map and watch as your Spear Launcher produces dummies to attack your enemies. The targeted amount of time between each spear launched was 3.00 seconds. Have fun, and don't be afraid to experiment!
 
Level 13
Joined
Dec 29, 2004
Messages
597
Yeah.. here's the leak.

Unit - Create 1 Dummy for (Owner of Spear Launcher 0000 <gen>) at (Position of Spear Launcher 0000 <gen>) facing Default building facing degrees

You should store the position on variable and remove the location in the end of uses.

call RemoveLocation(A)


@Vex: I like your style man, real fresh! :wink:
 
Level 1
Joined
Aug 20, 2006
Messages
2
plz help me

i got a language problem if anyone could help me i will be very happy lol. my problem is that i got spanish version and i dont know wich hability is locust if u could tell me in spanish or tell me one unit allreay has it to me to look for it it will be cool, ty m8s
 
Top