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

Attack Targeting

Status
Not open for further replies.
I don't think it's related to the patch but to the AI. All i know is, Neutral Hostiles will attack the nearest target but Computer players are smarter they will go after the weakest unit to eliminate it (which is the smart thing to do).
And if you are playing a normal melee game which runs melee AI Scripts the Computer players will go after the hero first.
 
Level 8
Joined
Aug 13, 2018
Messages
338
I want to make a map that like some android games such as Clash Royale and Trench Assault and in this games we have some units that they are a bastion for other units to get better teamwork result and with this mechanism we can't have that map, so how to remove this mechanism?
 
Level 39
Joined
Feb 27, 2007
Messages
5,023
It's literally there on the list where you see all of the other event response units. It would be the same to use Triggering Unit for a "unit enters playable map area" event. In most situations you can use Triggering Unit instead of the more specific event responses, you should have tried that.
 
Level 8
Joined
Aug 13, 2018
Messages
338
Untitled.png
Untitled1.png

In image <1> I set an unit variable and in image <2> I tried to use it but I can't find it. What's problem?
 
Level 9
Joined
Jul 30, 2018
Messages
445
Firstly, we need two forces. Secondly, the unit's owner must be ally of an another player.
So I need something like Moba maps (such as DotA map).

Why do the computer players need forces? You can have two forces for the human players and then change the owner of the units to an empty slot computer player. Also, you can set the ally with the trigger function "Player - Set Alliance".

And about your latest post: you haven't set the variable anything. The initial value is "- None -", which means the variable is now NULL therefore it's not on the list. "Unit Acquires a target" is a specific unit event. If you want to use it as generic unit event, you have to fake it with another event, like doom_sheep said.

For example, these triggers will cause the unit to explode when you deselect them. Now, the "Unit is deselected" is actually a specific unit event, so I have to fake it with some other event. I have "A unit enters region". You can use whatever, but using "A unit enters (Playable map are)" will add the event to every single unit that enters the game, so then the second trigger kinda acts like it was a generic unit event.

  • Trigger1
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to Trigger2 <gen> the event (Unit - (Entering unit) Is deselected)
  • Trigger2
    • Events
    • Conditions
    • Actions
      • Unit - Explode (Triggering unit)
 
Last edited:
Level 8
Joined
Aug 13, 2018
Messages
338
Why do the computer players need forces? You can have two forces for the human players and then change the owner of the units to an empty slot computer player. Also, you can set the ally with the trigger function "Player - Set Alliance".
Thanks for your help. With this system my map is almost ready for beta release.
 
Status
Not open for further replies.
Top