• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Issueing orders to com units

Status
Not open for further replies.
Level 8
Joined
Nov 9, 2008
Messages
502
Hello!

This map I'm working on has 5 spawning areas each with their own element. I would like to order the units around but within a rough range of their spawn point. Also not to limit them to this range but make it so they are not likely to move from it.

I've triggered an attack-move order to trained units sending them a random distance between 500 and 2000 in random direction but once they complete this attack move they travel back to their spawn point.

I tried to trigger with conditions to move them when they stop but it won't work...

  • dontstandstill
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(stop))
          • (Issued order) Equal to (Order(move))
    • Actions
      • Set temp_creep_pos = (Position of (Triggering unit))
      • Set temp_creep_pos2 = (temp_creep_pos offset by (Random real number between 500.00 and 2000.00) towards (Random angle) degrees)
      • Unit - Order (Triggering unit) to Attack-Move To temp_creep_pos2
      • Custom script: call RemoveLocation(udg_temp_creep_pos)
      • Custom script: call RemoveLocation(udg_temp_creep_pos2)
I was thinking to change the condition to 'if unit issued an order NOT EQUAL to attack-move' then run trigger but I am curious this might interfere with orders like casting spells or attacking.

Also how can I write attack move as a string? Do I need to do arithmetic and make 'attack + move' or simply 'attack,move'?

Anyone has some info on this?
 
Level 8
Joined
Nov 9, 2008
Messages
502
Hmmm, that's ok I was just curious about that.

Bascily, I need to know why after my units spawn and complete attack move order they proceed back to their spawn point as doing this destroys the effect and spread of creeps in my map.
 
Level 20
Joined
Jan 6, 2008
Messages
2,627
Hah, thats easy, just make a new region in the location your Unit is. and then a
trigger:
  • Events
    • A unit dies.
  • Conditions
    • Dying Unit Equals to YOUR UNIT
    • OR IF YOU NEED TO MAKE MANY OF THE UNITS
    • Owner of (Dying Unit) Equal to Player 12 Brown
  • Actions
    • Unit - Move Unit YOUR UNIT to REGION
    • And then your Actions you like.
    • IF 1 UNIT
    • Stop (This Trigger)
 
Level 8
Joined
Nov 9, 2008
Messages
502
I'm really not understanding your trigger. Where does dying come into it?

I don't understand why creeps are moving back to original position after attack-move. This isn't normal behavior is it?

Anyway I don't want to use regions because they are either too square or too random
 
Last edited:
Level 4
Joined
Jun 19, 2007
Messages
107
Did I understand correctly? You want your units to be in a pretty large area with random gaps between them? I just didn't get the whole thing. Because if it's what you are looking for there's more simple ways to do it also.
 
Level 8
Joined
Nov 9, 2008
Messages
502
I don't remember saying that :con:
I was saying "WHY do my units move back to original position after completely attack-move order".

No. 5 unit spawn areas. I had previously a region covering most map and units were issued order to a random point but I found there was too much randomness. Every unit type was everywhere. With the trigger involving 'move random distance at random angle' I thought it would achieve a semi grouping effect.

I want the units to be in a rough group, if left over time they will gradually mix.

Using the trigger I made sounds logical, if the units didn't move after completing attack-move order. Theoretically if that trigger is repeated they will gradually mix but because they are retarded they want to move back to spawn point and camp :hohum:
 
Level 8
Joined
Nov 9, 2008
Messages
502
Hmm. I will bear that in mind deathwind because I was hoping to keep them at 1 spawn point for the idea that the spawn points will attack heroes trying to farm them.

You guys need to read better :grin: I said 2000 distance, not units, and can u not tell I know how to destroy leaks from the trigger I wrote? :grin: Patrol would do more or less what it's doing now, which is not what I want. I prefer the units to attackmove to point, then find a new point to attackmove to.

I think I will have to use regions and set a % chance that units will move outside their spawn region :(
 
Status
Not open for further replies.
Top