| 01-09-2003, 04:03 PM | #1 |
Currently, im working on my first Warcraft III custom scenario. I have 6 computer players that are set as the human player's enemies. My problem is that when a human player attacks a computer unit of any color and the computer unit IS NOT within sight of another DIFFRENT COLOR computer unit, the unit simply sits there, not attacking until it dies. Now, if a computer unit of a different color is WITHIN sight of the attacked computer unit, both the computer units will attack. This is very confusing. I feel sure I need to write a short custom AI script to correct this, but I have never prgrammed ai before and I know NONE of the commands. I would really appreciate any help. Thanks. |
| 01-09-2003, 04:12 PM | #2 |
Guest | That sounds less like an AI scripting problem, and more like a Forces/Ally Settings problem. The first thing I'd do is go into Scenario->Force Settings (or something like that) and make sure that all of the computer players are on the same team, and that the human is on a different force. Next I'd go into the player settings and make sure that all of the computer players are set to 'computer' controlled, and nothing else (such as neutral passive) Last, if you use triggers to mess with any of the ally settings, get rid of them (disable them so you don't need to recreate them if this doesn't help) because you won't need them. You might have tried all of this, but I'm fairly certain the problem isn't with the AI scripts. Computer-controlled units should attack any unit it considers an enemy regardless of the AI script. That is hard-coded. The only exception would be if they were given an order to specifically do something else (such as move to a spot, rather than attack-move) |
| 01-09-2003, 06:07 PM | #3 |
Thanks a lot; that fixed it. :D That was a simple solution for an incredibly annoying problem. My error was in creating triggers to set ally properties. I deleted them and now it works fine. Oh, and BTW, is there any way to adjust the radius at which enemy units attack a hero if a hero casts spells? This is another annoying problem. Thanks much. |
| 01-09-2003, 06:26 PM | #4 |
u must change da acquisition range (ar, it's hard 2 spell this). b aware that ar is limited by da sight, so if u have a 500 sight/600 ar unit his ar will b limited 2 500 |
| 01-09-2003, 06:40 PM | #5 |
Do I change the AR for the unit being targeted or AR for the attacking unit? emote_sweat If I have to change the AR for the attacking unit im up poop creek without a poop stick, if you get my drift. |
| 01-09-2003, 06:45 PM | #6 |
no, u must change da ar in da unit editor, n 4 da unit that's goin 2 use da spells (so, da attacking) |
| 01-09-2003, 07:34 PM | #7 |
Ah, thanks again for the advice. One last thing(Hopefully): is there any way to issue a computer-controlled enemy unit to stop attacking when it enters a region and move back to its STARTING point? It seems to me there should be some way to do this, because the AI remembers where it is originally placed on the map and returns there when you move far enough out of its attack range. |
| 01-09-2003, 08:01 PM | #8 |
u can order da unit to move to da starting region (just create one on we) when he reaches some region |
