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

Minor trigger help needed.

Status
Not open for further replies.
Level 2
Joined
Apr 9, 2006
Messages
11
Okay to start this off, I like the site, but that's not why I am here. The reason is becuase i need some quick help on a map I am currently making.

To be quick I need to know how to make a trigger so that when a unit is on a circle of power it will spawn that unit type at the start location or either the "base" if you will call it.

EX: Shade steps on to circle 1, circle 1 has the ghoul unit, next the ghoul starts to spawn at the "base" area.

And another quick one is how do I make the units after they are spawned to mass attack an area on teh map, such as an enemy base.

Any help is much welcomed.

- Mike
 
Level 5
Joined
Mar 11, 2006
Messages
195
Make an area under the circle of power, make a trigger which loops every spawntime something like this:
[trigger:1:7e41733d7f]Spawn
Events
Time - Every (spawntime) seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in (Spawn_Unit1_area)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Picked unit)) Equal to Shade
Then - Actions
Unit - Create 1 Unit_of_type1 for (Owner of (Picked unit)) at (Center of (Spawnarea)) facing Default building facing degrees
Else - Actions
Unit Group - Pick every unit in (Units in (Spawn_Unit2_area)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Picked unit)) Equal to Shade
Then - Actions
Unit - Create 1 Unit_of_type2 for (Owner of (Picked unit)) at (Center of (Spawnarea)) facing Default building facing degrees
Else - Actions
[/trigger:1:7e41733d7f]

It will then spawn a unit of the type for each shade on the circle (in this example for 2 unit types, using 2 circles)

For the second question, make an abilaty which is based on an abilaty which can be targetted anywhere (like flare gun, reveal, etc.) call it Mass Attack Move
[trigger:1:7e41733d7f]Attack Move
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Mass Attack Move
Actions
Set Point = (Target point of ability being cast)
Unit Group - Pick every unit in (Units within 1000.00 of (Position of (Triggering unit)) matching ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit)))) and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Attack-Move To (Point offset by (Random real number between 1.00 and 300.00) towards (Random angle) degrees)
[/trigger:1:7e41733d7f]
this trigger will cause all units within 1000 range of the casting unit to make an attack move to the target of the attack move abilatie, the point offset and random angle are to make the units move next to each other instead of a thin long line.

Btw it is much appreciated if you would join our community instead of posting a question just once.
 
Level 2
Joined
Apr 9, 2006
Messages
11
Don't worry I recently semi-retired on another game to play warcraft, and I like the forums here aren't to shabby.

Also thank-you very muc for taking time out to do this.
 
Level 2
Joined
Apr 9, 2006
Messages
11
Ok, for an update im still having a little trouble with the mass attack thing. I made a new spell ability and felt like naming it "Mass Attack (middle)."

But I just don't get how to make them attack the spot I need attacked.

help6cs.jpg
 
Level 5
Joined
Mar 11, 2006
Messages
195
hmmz i dont really understand the picture, the shades are in the top right in some kinda box? and you want them to attack the middle? and they are from different players(looking at the colours)?
if they are from different players and you want them to attack the middle then you should remove the ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit)) line.
give a bit longer explanation on the field and the meaning of the attack move (does the casting unit (unit giving the mass attack command) have to attack or units that are spawning)
 
Status
Not open for further replies.
Top