Computer vs Players (Zombie / *Kodo* Tag) Script, AI, Tutorial, Guide?

lindenkron

You can change this now in User CP
Reaction score
102
Anyone know where to find some help on this? Because my zombies are acting like retards..

A guide or explanation on how to make something like this would be most beloved, I like how it works in Kodo tag etc. They have a tendency to go to a location of a player, when they get there and the player is gone, they walk back to their spawn point and just stand there..

No idea how to fix :p tried for a few days now.
 
1

1RingToRule

Guest
I might suggest using a "Time - Periodic Event" and reorder the zombies to go to the players location each time the trigger runs. i.e. don't let the wc3 AI do anything as I often find wc3's AI never does exactly as I want it too. (I don't know if that's exactly what you wanna do as I haven't played Kodo tag.)

Hope that helped,

1RingToRule
 

lindenkron

You can change this now in User CP
Reaction score
102
On a more serious note, would you accept help in Jass?

I'd prefere it being GUI, because I don't feel like learning JASS :eek:




Is there anyway you can detect of a unit gets to the point that it has been ordered to, but just "stops" or decided to go back (why ever they do that) ?

So I can tell it to move to the new location of the player if that happens?
 

free_killing

TH.net Regular
Reaction score
23
Just make a region called A, when a unit enters A, entering unit equal to Kodo, then force it to patrol to random point in playable area.

I am not sure if it would work, but i guess.. becasue of if it patrol, it will attack every near things, but it will come back, and when it comes back, it gets a new location to move to :)

Edit: so the trigger would be like this:
Trigger:
  • Kodo Patrol
    • Events
      • Unit - A unit enters A <gen>
    • Conditions
      • (Unit-type of (Entering unit)) Equal to Kodo
    • Actions
      • Set MyLocation = (Random point in (Playable map area))
      • Unit - Order (Entering unit) to Patrol To MyLocation
      • Custom script: call RemoveLocation(udg_MyLocation)
 

Azlier

Old World Ghost
Reaction score
461
My favorite zombie movement was done in vJass, but this essentially the GUI version.

Trigger:
  • Example
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Set tempGroup = (Units owned by Player 12 (Brown) matching ((Current order of (Matching unit)) Equal to (==) (Order(none))))
      • Unit Group - Pick every unit in tempGroup and do (Actions)
        • Loop - Actions
          • Set tempPoint = (Random point in (Playable map area))
          • Unit - Order (Picked unit) to Attack Ground tempPoint
          • Custom script: call RemoveLocation(udg_tempPoint)
      • Custom script: call DestroyGroup(udg_tempGroup)

Unless you put in the condition demanding that the order be none, you get get some zombie confusion and they will tend to hang around the map center.
 

lindenkron

You can change this now in User CP
Reaction score
102
azlier, your post got me to make this:
Trigger:
  • OrdersAttack
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • -------- ALL THE MARINES THAT ARE ALIVE --------
      • Set TempUnitGroup[1] = (Units in (Playable map area))
      • Unit Group - Pick every unit in TempUnitGroup[1] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Owner of (Picked unit)) Equal to Neutral Passive
                  • (Owner of (Picked unit)) Equal to Player 12 (Brown)
                  • (Life of (Picked unit)) Equal to 1.00
            • Then - Actions
              • Unit Group - Remove (Picked unit) from TempUnitGroup[1]
            • Else - Actions
      • -------- ALL UNITS OWNED BY PLAYER 12 BROWN --------
      • Set TempUnitGroup[2] = (Units in (Playable map area))
      • Unit Group - Pick every unit in TempUnitGroup[2] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Picked unit)) Not equal to Player 12 (Brown)
            • Then - Actions
              • Unit Group - Remove (Picked unit) from TempUnitGroup[2]
            • Else - Actions
      • -------- ORDER BROWN TO ATTACK RANDOM UNIT IN TempUnitGroup[1] --------
      • Unit Group - Pick every unit in TempUnitGroup[2] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Current order of (Picked unit)) Equal to (Order(none))
            • Then - Actions
              • Unit - Order (Picked unit) to Attack (Random unit from TempUnitGroup[1])
            • Else - Actions
      • Custom script: call DestroyGroup (udg_TempUnitGroup[1])
      • Custom script: call DestroyGroup (udg_TempUnitGroup[2])


Seems all good? Gonna go test it with some mates as soon as they get out of their map :)
 

CaptDeath

New Member
Reaction score
103
try macking the interval smaller are they gunna stand like a retard for 5 seconds before reciving new orders
also you did not set
Trigger:
  • Unit Group - Remove (Picked unit) from TempGroup

in the trigger
 

Azlier

Old World Ghost
Reaction score
461
GAH! A massive block of GUI! It burnsssss!

Anyway, if your marines can build barricades and such, this won't work. You are ordering the zombies to attack the marines directly, not attack moving to their position. Even without barricades, it can cause zombies to walk by humans, ignoring them, to hit their target.
 

lindenkron

You can change this now in User CP
Reaction score
102
GAH! A massive block of GUI! It burnsssss!

Anyway, if your marines can build barricades and such, this won't work. You are ordering the zombies to attack the marines directly, not attack moving to their position. Even without barricades, it can cause zombies to walk by humans, ignoring them, to hit their target.

Hmm, true I see your point, and yes walls can be build. But there is no "attack-move" in my dropdown menu at "Attack". How to fix this? :)

Edit; Atleast it's leakless GUI!! Ha! :p

try macking the interval smaller are they gunna stand like a retard for 5 seconds before reciving new orders
also you did not set
Trigger:
  • Unit Group - Remove (Picked unit) from TempGroup

in the trigger

This was hotfixed within 15 sec, I can't believe you managed to see it haha. Well it's been changed :)
 

Azlier

Old World Ghost
Reaction score
461
There is truly no such order as Attack Move. I blame Blizzard for doing that. They have to muck things up to make it "easier for the users". Just issue the order "attack" on a point instead of a unit.
 

lindenkron

You can change this now in User CP
Reaction score
102
Ah, think I found a solution. This seems good?

Trigger:
  • Unit - Order (Picked unit) to Attack-Move To (Position of (Random unit from TempUnitGroup[1]))
 

CaptDeath

New Member
Reaction score
103
yes
the draw back being that a poor zombie could end up tracking some one a hole game w/o ever being seen lol depending on the strat of the player
 

lindenkron

You can change this now in User CP
Reaction score
102
yes
the draw back being that a poor zombie could end up tracking some one a hole game w/o ever being seen lol depending on the strat of the player

Players cant run in this map, they'd end up getting raped .. I think xD Atleast im trying to design it as a "build base" map.

Having a slight issue. The zombies once they get to the point they move back to their original spawn point.

I read somewhere this was due to some AI setting or something? How to avoid that.
 

Trollvottel

never aging title
Reaction score
262
are your zombies owned by neutral player?


Position of (Random unit from TempUnitGroup[1])

dont forget this thingy, the point leaks so you got to store it in a variable etc, you know...
 

Azlier

Old World Ghost
Reaction score
461
You're using Neutral Hostile, aren't you? Simplest solution:

Go to Advanced > Gameplay Constants > Creeps

And change these to 9999999.:
Creeps - Guard Distance
Creeps - Guard Return Distance
Creeps - Guard Return Time (sec)

Another solution: Have the zombies belong to an actual player.
 

lindenkron

You can change this now in User CP
Reaction score
102
are your zombies owned by neutral player?


Position of (Random unit from TempUnitGroup[1])

dont forget this thingy, the point leaks so you got to store it in a variable etc, you know...

Why does it leak?

No they are owned by Player 12 Brown :)
 

Azlier

Old World Ghost
Reaction score
461
Position of (Any Unit imaginable, even the ones that don't exist because it goes to the center of the map by default) leaks until you remove it. Always.
 

lindenkron

You can change this now in User CP
Reaction score
102
Position of (Any Unit imaginable, even the ones that don't exist because it goes to the center of the map by default) leaks until you remove it. Always.
Trigger:
  • OrdersAttack
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • -------- ALL THE MARINES THAT ARE ALIVE --------
      • Set TempUnitGroup[1] = (Units in (Playable map area))
      • Unit Group - Pick every unit in TempUnitGroup[1] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Owner of (Picked unit)) Equal to Neutral Passive
                  • (Owner of (Picked unit)) Equal to Player 12 (Brown)
                  • (Life of (Picked unit)) Equal to 1.00
            • Then - Actions
              • Unit Group - Remove (Picked unit) from TempUnitGroup[1]
            • Else - Actions
      • -------- ALL UNITS OWNED BY PLAYER 12 BROWN --------
      • Set TempUnitGroup[2] = (Units in (Playable map area))
      • Unit Group - Pick every unit in TempUnitGroup[2] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Picked unit)) Not equal to Player 12 (Brown)
            • Then - Actions
              • Unit Group - Remove (Picked unit) from TempUnitGroup[2]
            • Else - Actions
      • -------- ORDER TempUnitGroup[2] TO ATTACK RANDOM UNIT IN TempUnitGroup[1] --------
      • Unit Group - Pick every unit in TempUnitGroup[2] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Current order of (Picked unit)) Equal to (Order(none))
            • Then - Actions
              • Set TempLocation = (Position of (Random unit from TempUnitGroup[1]))
              • Unit - Order (Picked unit) to Attack-Move To TempLocation
              • Custom script: call RemoveLocation (udg_TempLocation)
            • Else - Actions
      • Custom script: call DestroyGroup (udg_TempUnitGroup[1])
      • Custom script: call DestroyGroup (udg_TempUnitGroup[2])


Leak free?
 
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