• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

make creeps roam map

Status
Not open for further replies.
Level 12
Joined
Jan 13, 2008
Messages
559
Hello, I am looking for a decent creep roam system but I can't find anything. I am working a survival map where zombies spawn at night and they should attack the nearest player or just a random player.

What I tried:
-Wander Ability (terrible idea)
-Order them to attack-move to position of a random hero (bad idea, they ignore sometimes nearby heroes)
-giving them unlimited sight and acquisition range (doesnt work..idk why..they move to the position of a hero for some meters and then move back..)

any ideas?
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
Manually order them to attack move to position of closest enemy unit. Should be in some kind of periodic trigger, but you should make sure, that not every creep is ordered at the same time. Also the frequency of the orders should not be too high.
 
Level 12
Joined
Jan 13, 2008
Messages
559
why is it a problem when I order them at the same time? how do I check this? another problem which is weird is when a player is on a cliff and the 2 entries are blocked with barricades. Instead of attacking the barricades the monsters zombies just stand below the cliff trying to attack the hero (which is not possible)...to fix this I need to put the priority of heroes below the one for barricades...hm thats kinda bad
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
The problem is that calculating the closest hero takes a lot of time. Doing it all at the same time will cause lag spikes periodically. Instead of ordering every 2 seconds (every 2 seconds lag spike), you order every 0.05 seconds some of the units to attack move.
I think this is general warcraft 3 behaviour. Since the barricades do not attack, the zombies try to attack the heroes. Are the barricades hostile to the zombies?
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
Try this:
Units owned by neutral hostile will attack the closest unit owned by player 1.
 

Attachments

  • AttackMove.w3m
    19.1 KB · Views: 45
Status
Not open for further replies.
Top