Cowards!

Level 3
Joined
Dec 27, 2008
Messages
36
i make an aos - like map
and i got a problem
when a wave of creeps defeat enemy wave of creeps they just run back to the base hapily =)
when i change creep owners to neutral (empty) player slots they stop coming back and walk normaly forward
but there is another problem here:
neutral player slots can not share vision!

HELP? (i am a GUI user)
 
Level 5
Joined
May 27, 2007
Messages
162
Yeah like DarkAngel said.

Time - Period Event - Every 2 seconds

Pick Every unit which is a creep owned by player 2
Order picked unit to move-attack to where you want them to end up

Or just order them to do attack-move when you create them, they shouldn't pause/stop anywhere.
 
Level 3
Joined
Dec 27, 2008
Messages
36
Time - Period Event - Every 2 seconds

Pick Every unit which is a creep owned by player 2
Order picked unit to move-attack to where you want them to end up

this does not work for me because different groups of creeps go to different places

and if i command them to move attacking everyone on their way they still end up coming back

HELP! i am in a desperate situation.
kind of =)
 
Level 3
Joined
Dec 27, 2008
Messages
36
just what i was thinking =P

{EDIT}
sry for double posting but

nothing helps! yay

i wanna kil myself with the wall >_<

maybe somthing with AI settings?
 
Last edited by a moderator:
Level 10
Joined
Aug 15, 2008
Messages
720
You will need to use hashtables. Also check if "Unit - Can Flee" is false.
If you don't know or don't know how to use hashtables, then see this: http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/hashtables-mui-133407/
This is rough example, but if you know hashtables at least a bit, then it should give you idea.

  • HashInit
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set WaveUnitHashtable = (Last created hashtable)
  • Add spawned units to hashtable
    • Events
      • Time - Elapsed game time is 20.00 seconds
    • Conditions
    • Actions
      • -------- Lets do it in easy way. First spawn, then add spawned units to hashtable. --------
      • -------- WAYPOINTS - LEFT LANE - RED TEAM [SETUP] --------
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set WaypointLeftLaneRedTeam[0] = <Waypoint 0 (first waypoint for your creatures to go)
          • Set WaypointLeftLaneRedTeam[1] = <Second waypoint>
          • Set WaypointLeftLaneRedTeam[2] = <Third Waypoint>
          • Set WaypointLeftLaneRedTeam[3] = <Fourth waypoint>
          • Set WaypointLeftLaneRedTeam[4] = <Fifth waypoint>
          • Set ReachedWPCount = 0
          • -------- x --------
          • Unit - Create 1 <Your creep> for Player 1 (Red) at <Spawn Point> facing Default building facing degrees
          • Hashtable - Save ReachedWPCount as (Key reached_wp_count) of (Key (Last created unit)) in (Last created hashtable)
          • Hashtable - Save Handle OfWaypointLeftLaneRedTeam[0] as (Key waypoint_red_left_0) of (Key (Last created unit)) in WaveUnitHashtable
          • Hashtable - Save Handle OfWaypointLeftLaneRedTeam[1] as (Key waypoint_red_left_1) of (Key (Last created unit)) in WaveUnitHashtable
          • Hashtable - Save Handle OfWaypointLeftLaneRedTeam[2] as (Key waypoint_red_left_2) of (Key (Last created unit)) in WaveUnitHashtable
          • Hashtable - Save Handle OfWaypointLeftLaneRedTeam[3] as (Key waypoint_red_left_3) of (Key (Last created unit)) in WaveUnitHashtable
          • Hashtable - Save Handle OfWaypointLeftLaneRedTeam[4] as (Key waypoint_red_left_4) of (Key (Last created unit)) in WaveUnitHashtable
          • -------- x --------
          • Unit Group - Add (Last created unit) to SpawnWaveGroupTeamRed
          • -------- Removing leaks --------
          • Custom script: call RemoveLocation(udg_WaypointLeftLaneRedTeam[0])
          • Custom script: call RemoveLocation(udg_WaypointLeftLaneRedTeam[1])
          • Custom script: call RemoveLocation(udg_WaypointLeftLaneRedTeam[2])
          • Custom script: call RemoveLocation(udg_WaypointLeftLaneRedTeam[3])
          • Custom script: call RemoveLocation(udg_WaypointLeftLaneRedTeam[4])
      • -------- It will spawn 10 units. --------
  • Check for next waypoint and ordering
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Unit Group - Pick every unit in SpawnWaveGroupTeamRed and do (Actions)
        • Loop - Actions
          • -------- Hash load --------
          • Set ReachedWPCount = (Load (Key reached_wp_count) of (Key (Picked unit)) from WaveUnitHashtable)
          • Set WaypointLeftLaneRedTeam[0] = (Load (Key waypoint_red_left_0) of (Key (Picked unit)) in WaveUnitHashtable)
          • Set WaypointLeftLaneRedTeam[1] = (Load (Key waypoint_red_left_1) of (Key (Picked unit)) in WaveUnitHashtable)
          • Set WaypointLeftLaneRedTeam[2] = (Load (Key waypoint_red_left_2) of (Key (Picked unit)) in WaveUnitHashtable)
          • Set WaypointLeftLaneRedTeam[3] = (Load (Key waypoint_red_left_3) of (Key (Picked unit)) in WaveUnitHashtable)
          • Set WaypointLeftLaneRedTeam[4] = (Load (Key waypoint_red_left_4) of (Key (Picked unit)) in WaveUnitHashtable)
          • -------- Ordering --------
          • Unit - Order (Picked unit) to Attack-Move To WaypointLeftLaneRedTeam[ReachedWPCount]
          • -------- Checking if WP is reached --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Region centered at WaypointLeftLaneRedTeam[ReachedWPCount] with size (300.00, 300.00)) contains (Picked unit)) Equal to True
              • ReachedWPCount Less than 4
            • Then - Actions
              • Hashtable - Save (ReachedWPCount + 1) as (Key reached_wp_count) of (Key (Last created unit)) in (Last created hashtable)
              • Hashtable - Save Handle OfWaypointLeftLaneRedTeam[0] as (Key waypoint_red_left_0) of (Key (Last created unit)) in WaveUnitHashtable
              • Hashtable - Save Handle OfWaypointLeftLaneRedTeam[1] as (Key waypoint_red_left_1) of (Key (Last created unit)) in WaveUnitHashtable
              • Hashtable - Save Handle OfWaypointLeftLaneRedTeam[2] as (Key waypoint_red_left_2) of (Key (Last created unit)) in WaveUnitHashtable
              • Hashtable - Save Handle OfWaypointLeftLaneRedTeam[3] as (Key waypoint_red_left_3) of (Key (Last created unit)) in WaveUnitHashtable
              • Hashtable - Save Handle OfWaypointLeftLaneRedTeam[4] as (Key waypoint_red_left_4) of (Key (Last created unit)) in WaveUnitHashtable
            • Else - Actions
          • -------- Checking if unit is killed --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to False
            • Then - Actions
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in WaveUnitHashtable
              • Unit Group - Remove (Picked unit) from SpawnWaveGroupTeamRed
            • Else - Actions
          • -------- Removing leaks --------
          • Custom script: call RemoveLocation(udg_WaypointLeftLaneRedTeam[0])
          • Custom script: call RemoveLocation(udg_WaypointLeftLaneRedTeam[1])
          • Custom script: call RemoveLocation(udg_WaypointLeftLaneRedTeam[2])
          • Custom script: call RemoveLocation(udg_WaypointLeftLaneRedTeam[3])
          • Custom script: call RemoveLocation(udg_WaypointLeftLaneRedTeam[4])
 
Last edited:
Level 3
Joined
Dec 27, 2008
Messages
36
no easier way really?
maybe it is possible to change something with their AI or order taking program?
or make it so that neutral player slots will share vision?

if not then i will try hashtables and see if those work
 
Level 3
Joined
Dec 27, 2008
Messages
36
and by the way the whole idea of my map is to use creeps of random unit types changing randomly each wave

maybe that makes them run?
 
Level 10
Joined
Aug 15, 2008
Messages
720
Well, Hashtables would do the thing. But to make creep waves to run through waypoints, smoothly, you need to give each unit location variable, which can be done in Hashtables. Of course vJASS or just JASS is good too.

The other way I just thought:
Random unit spawn, add them to unit group, order the group every x sec to "Attack-Move-To" first waypoint, when creeps are in first waypoint, remove them from group and add them to new unit group and new unit group will order attack-move-to next waypoint every x seconds AND SO ON. I guess this will be best choice if you don't like hashtables. It will be lots of unit groups, though.
 
Level 13
Joined
Aug 31, 2009
Messages
741
Slow right down everyone, there's a far easier way to solve this:

Just use the function
  • AI - Ignore the Guard Position for all of (<Player>)'s units
This forces the AI to forget where the units originally came from, and so they literally can't order the units back. I use it in my map, and it works perfectly.
 
Level 3
Joined
Dec 27, 2008
Messages
36
After the AI Ignores the Guard Position
creeps no more run away but they still do not go further
and yet the strange thing is that everything is ok with neutral player slots
 
Top