A trigger that I don't know how to make! :(

Fulgore

New Member
Reaction score
0
Well it seemed easy to do at first, but I soon realized it wasn't easy for me. In my map I have units that spawn and it will spawn more when the amount of them equal 0.

But that's not the hard part , but the part that comes up is when I want them to patrol/attack ground a random player/player hero. Now I was gonna try doing the attack move to random unit of type, BUT there are 4 possible heroes and they're all different :( so what do I do for this? :confused:

Thanks ahead for any help
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Make a Unit-Group of (Units in (Playable map area)), and just filter out all but the heroes, ((Matching unit) is A Hero Equal to True) ;)

Note: I'm at school, so don't have WE here XD
 

theDTD

Active Member
Reaction score
8
*I dont really get the question
*this is my answer based on what i understood
-------
E: a unit dies
C: all units of (Unit Group) are dead equal to true
A: create (unit) in (region A)
:issue (last created unit) to random point
--------
 

Happy

Well-Known Member
Reaction score
71
i hope i got it right....u want a group of units patrol after spawning and attack one of the heroes(4 different)? then it is...

E: a unit is created
C: ---
A: pick every unit in playable map area matching unit is a hero equal to false and do....and then you tell where they shall go^^e.g. move/attack random unit owned by player X matching unit is a hero equal to true...or order them to move(/attack) to some areas and if they see a hero then attacking.

note: im writing from a friend's computer so sry.....he dont plays wc3.
 

HydraRancher

Truth begins in lies
Reaction score
197
@Offtopic:
@Happy
Your writing freehand? Have you seen MY freehand? I spend half an hour writing out this huge spell code which I could easily code via warcraft 3 trigger editor. I'm quite simply only doing it to improve my GUI typing speed. I find it rather lazy (no offense) how people type:
pick every unit in playable map area and kill picked unit
whilst they can spend a little more time typing:
Unit Group - Pick every unit in (Playable map Area) and do - Unit - Kill (Picked Unit) Before we argue, I am only putting forward my personal opinion.




One method is to use the Fortress Survival method which is I think giving units 99999 aquisition range (but not attack range) and making them see the entire map.
 

duderock101

Check out my 2 Player Co-op RPG!
Reaction score
71
put each hero into a vairable which has an array of how many heros you will have on the map, u said 4.

just do it to

Pick every unit --your unit-- in playable map area and picked unit attack move to Hero[math random between 1-4]

Hero being a unit variable which you will store each of your heros into.

Hope that helped.
 

Moridin

Snow Leopard
Reaction score
144
I find adding all the heroes to a group via:

Unit Group - Pick every unit in (Playable Map Area) matching (((Matching unit) is A Hero) Equal to True) and do - Unit group - Add (Picked unit) to <Your unit group here>.

...and then simply ordering the creeps to attack move to a random one via the:

Unit - Issue order targeting a point
which becomes
Unit - Order unit to Attack-Move to (Position of (Random unit in (Unit group)))

...is more efficient than adding every hero to a variable.
Also please note that the wording / brackets given in the above triggers might not be perfectly accurate. I'm not that great with freehand GUI :p.
 

Fulgore

New Member
Reaction score
0
*I dont really get the question
*this is my answer based on what i understood
-------
E: a unit dies
C: all units of (Unit Group) are dead equal to true
A: create (unit) in (region A)
:issue (last created unit) to random point
--------

i hope i got it right....u want a group of units patrol after spawning and attack one of the heroes(4 different)? then it is...

E: a unit is created
C: ---
A: pick every unit in playable map area matching unit is a hero equal to false and do....and then you tell where they shall go^^e.g. move/attack random unit owned by player X matching unit is a hero equal to true...or order them to move(/attack) to some areas and if they see a hero then attacking.

note: im writing from a friend's computer so sry.....he dont plays wc3.


Well the spawning thing was just extra information I guess I didn't really need to put in. All I want is my spawn units to randomly attack/move to a random hero out of the players on the map and there's 4 possible hero types.




@Offtopic:
@Happy
Your writing freehand? Have you seen MY freehand? I spend half an hour writing out this huge spell code which I could easily code via warcraft 3 trigger editor. I'm quite simply only doing it to improve my GUI typing speed. I find it rather lazy (no offense) how people type:
pick every unit in playable map area and kill picked unit
whilst they can spend a little more time typing:
Unit Group - Pick every unit in (Playable map Area) and do - Unit - Kill (Picked Unit) Before we argue, I am only putting forward my personal opinion.




One method is to use the Fortress Survival method which is I think giving units 99999 aquisition range (but not attack range) and making them see the entire map.

I did think of this later on, but does that end up getting them stuck anywhere? Or is it just as effective as the trigger method that's being suggested by the other posters?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top