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

[General] Unit wave order to attack hero, instead region

Status
Not open for further replies.
Level 4
Joined
Dec 16, 2013
Messages
84
Hello
sry for my english
so,
how do i order a unit wave to attack player's hero instead make them attack "center of region"??

i used to play map called "orc gladiator"
the unit wave seems always attack player's unit instead order "attack-move" to certain region

so when player unit moves to certain location, the unit wave keep attacking player's unit even it is blocked.

thanks
 
Level 4
Joined
Dec 16, 2013
Messages
84
Set the player's hero during selection into a unit variable then order the units periodically (so that stun will not stop their attack) to attack the unit in the unit variable (which is the hero).

actually i was thinking about that, and still can't make it

This is player's hero
  • Spawn Team
    • Events
      • Unit - A unit Sells a unit
    • Conditions
    • Actions
      • Game - Display to (All players matching ((Matching player) Not equal to (Owner of (Buying unit)))) the text: ((Palyer_Colours[(Player number of (Owner of (Buying unit)))] + ((Name of (Owner of (Buying unit))) + (|r + ( has chosen + (Name of (Sold unit)))))) + )
      • Set SpawnedUnit = (Sold unit)
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Sold unit) to SoldUnit
          • Special Effect - Create a special effect at (Center of Region 001 <gen>) using Abilities\Spells\Other\Awaken\Awaken.mdl
          • Selection - Select (Sold unit) for (Owner of (Sold unit))
          • Unit - Move (Sold unit) instantly to (Center of Region 001 <gen>)
          • Camera - Pan camera for (Owner of (Sold unit)) to (Position of (Sold unit)) over 0.00 seconds
      • Hero - Add 100010000 experience to (Sold unit), Hide level-up graphics
This is timer for first wave
  • Time Start
    • Events
      • Time - Elapsed game time is 10.00 seconds
    • Conditions
    • Actions
      • Countdown Timer - Show TimerWindow
      • Set TimerWindow = (Last created timer window)
      • Countdown Timer - Start Timer as a One-shot timer that will expire in 30.00 seconds
      • Set Timer = (Last started timer)
      • Countdown Timer - Create a timer window for Timer with title Level 1 in
this is the first wave unit
  • Wave
    • Events
      • Time - Timer expires
    • Conditions
    • Actions
      • Unit - Create (4 x (Player number of (Owner of (Sold unit)))) Satyr for Player 11 (Dark Green) at (Center of Region 004 <gen>) facing (Facing of Tavern 0002 <gen>) degrees
and this is a unit that i wanted to attack-move to all players heroes instead region
  • Untitled Trigger 001
    • Events
      • Unit - A unit enters Region 004 <gen>
    • Conditions
    • Actions
      • Unit - Order (Entering unit) to Attack-Move To (Center of Region 005 <gen>)

i did make the heroes to unit variable, but i can't put it
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
On a side note, you need to fix memory leaks. I commented on another question of yours and it appears you don't know how to use variables. First learn how to use a variable.

Memory leaks are a common problem amongst new users. A memory leak is something that wastes the computers memory until the game is exited. In other words, you map will become laggy. A couple of memory leaks is fine, but start piling them up and you'll have a problem.

Here is a tutorial: http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=27219

Learn Variables First!!

how do i order a unit wave to attack player's hero instead make them attack "center of region"??

There are a few ways to do this. You can trigger the move order like mentioned above, or you can increase the "Combat - Acquisition Range" of the attackers. Give the enemy player range of the map and set the acquisition range to 999999 or something. They will notice heroes from anywhere on the map and will ALWAYS attack the NEAREST enemy unit.
 
Status
Not open for further replies.
Top