• 🏆 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!

[AI] Melee + custom AI

Status
Not open for further replies.
Level 1
Joined
Sep 15, 2004
Messages
1
Okay I'm pretty much a newbie at using the Warcraft 3 world editor, but I'm trying the best I can.

What I'm trying to do is make a map where human players pick a hero and fight against regular computer opponents. Victory is achieved by destroying an enemy building keep in the heart of their base.

To spice things up I added some spiced up turrets to defend the middle ground on both sides, and have both sides auto-generate a few guys that charge towards the other side every minute or so. Things are going slow as I learn the program, but atm I have two main problems:

1.I want units to stop being generated if a specific building is destroyed, so I tried adding a condition that if a unit entered a specified region (where the building was), and if said unit was a building, the trigger would go off. It didn't work, what am I doing wrong?

2. I need to use the melee AI in order for the computer to do it's thing, but I can't figure out how to make SPECIFIC computer players do what I tell them to do (i.e. send those generated units to attack). I've got triggers in the region in which they are generated that periodically sends commands to patrol to the enemy base, but the melee AI overwrites those commands and uses the generated units like regular units. Is there any fairly easy way around this?

Any help would be greatly appreciated :)
 
Level 2
Joined
Sep 4, 2004
Messages
30
Yes: AI - Ignore All units guard position
This trig removes all units from the ai's control,
but you should execute this frequently, so new units are also ignored.

A "smarter" way is that you dont load the ai's at all, and you write triggers that generate the units.
So you can decide what they should build.
 
Level 6
Joined
Jun 16, 2004
Messages
237
1. Use AI - Send AI Command to send an integer (e.g. 1) to the AI script when the specific event occurs. Then add a condition to Building Priorities, in which it checks whether this integer is 0 or 1. If it is 0 (default) units are built; if it is non-zero, don't build units. The condition is something like "Last Command, Leave the Command Equal to 0".

2. As Fury said, use AI - Ignore Unit's Guard Position on a unit to which you want to assign a manual order. Make sure that you do so before it is assigned to the AI's attack group.
 
Status
Not open for further replies.
Top