Problem with spawned units

G

grupoapunte

Guest
i have a big problem in my map:
1. i spawn units at a specific place
2. i tell them to attack-move to a point
3. if the unit reach that point its ok
4. if not the unit go back to the spawn point

is there any way to solve this last step (i dont want units to go back)
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
608
If the units you send don't have anything to attack they will automacticly go back to the last position they were.

Something weird with AI :nuts: Seen this in dota
 

lesson

New Member
Reaction score
5
well is the way to the specific point blocked by something?
i can't raelly understand your question

grupoapunte said:
3. if the unit reach that point its ok

are saying that only some of the units will reach the point?
cause that dosn't make sense..

thought there is something that also could be the reason why they wont
.. i once tried that the units i wished to spawn ran towards the "player start location" when they spawned, but back then i didn't give them any move orders.. i dont know :confused:
 

lesson

New Member
Reaction score
5
Orc_Tamer said:
If the units you send don't have anything to attack they will automacticly go back to the last position they were.

hmm.. the attack move order the unit to attack any unit it incounter on it's way to the chosen target.. so i dont really thng that's the reason..
 

zyzfcs

New Member
Reaction score
5
How bout try someting like this:

Code:
Untitled Trigger 001
Events
    Time - Every 10.00 seconds of game time
Conditions
Actions
    Set Hostile_Region = (Random point in Region 001 <gen>)
    Unit - Create 12 Footman for Player 1 (Red) at (Center of Region 000 <gen>) facing Default building facing degrees
    Set TempRegion = (Units in Region 000 <gen>)
    Wait 2.00 seconds
    Unit Group - Pick every unit in TempRegion and do (Actions)
        Loop - Actions
            Unit - Order (Picked unit) to Move To Hostile_Region



Untitled Trigger 002
Events
    Unit - A unit enters Region 001 <gen>
Conditions
Actions
    Set TempRegion2 = (Units in Region 001 <gen> owned by Player 2 (Blue))
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            (Owner of (Entering unit)) Equal to Player 1 (Red)
        Then - Actions
            Unit Group - Pick every unit in TempRegion2 and do (Actions)
                Loop - Actions
                    Unit - Order (Picked unit) to Attack (Entering unit)
        Else - Actions
            Do nothing
 

Jazradel

Helping people do more by doing less.
Reaction score
102
Are some of them owned by neutral players? Neutral units will only run so far before heading back to their camp. You can change that somewhere in gameplay constants.
 
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