• 🏆 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] Creeps Charge

Status
Not open for further replies.
Level 13
Joined
Nov 22, 2006
Messages
1,260
Depends on how much movement speed you want them to have while wandering and while charging. Do you mean that wandering should be with their original ms or lower? And by charging you want a higher ms than the speed limit 522?
 
Level 8
Joined
Apr 30, 2009
Messages
338
You could make a trigger that casts bloodlust on the unit when a hostile enters its acquisition range, and then a trigger that removes the buff when it starts to attack.
 
Level 8
Joined
Apr 30, 2009
Messages
338
How about having a dummy unit cast a +100% movespeed bloodlust on the unit when it is ordered to attack, and also place a buff on the unit for like 30 seconds that prevents it from getting the bloodlust buff.
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
For wandering, I guess you could add the Wander ability to them (I'm not sure what it's called), and change their movement speed with an item ability (if it exists...it should), you can probably decrease the speed by entering a negative value (and increase by entering a positive value, ofc). Item abilities are good since they do not show as buffs.

Now, for a charge you would probably need a trigger (since you would probably want a knockback because that's what Diablo's Minions do). But I need some more details on this if you want a code. Do you want the unit to move at 522 and then hit the unit, change it's ms back and start wandering again?
 
Level 11
Joined
Apr 28, 2008
Messages
696
When a unit comes into attackrange of another enemy unit, the enemyunit will get the attackorder sent from WC3 itself. So you can link a trigger to that event a "unit gets specific order" and increase the movementspeed. Than you start a timer linked to that unit. When that timer exspires the movementspeed wil be set to default. And every time the unit attacks or is attacked you refresh that timer. By that way you'll simulate the "in fight status" from WoW. Don't know if its really possible to make that MUI, cause for my single hero it works fine. But there is only one timer needed and one event.

Thy
 
@Silvenon, no no no lol, its not an ability 'Charge', its just like, in any RPG, creeps wander around very slowly, and when they see an enemy, they run at it to attack, this is what i was thinking.


@Thyrael, that sounds like a good idea actually, but will the Order 'attack' work?
Also, i was thinking if this was for any creep, so if it wont work MUI then im guessing it wont work.
 
Level 11
Joined
Apr 28, 2008
Messages
696
After thinking for a while I come to the point that it can be done via JASS, but I don't know how exactly. Cause with locals it should work. Would be like a "function updateFightTimer takes unit u, timer t returns nothing" and the given parameter will be the unit and the linked timer. And it fire when a unit is attacked, attacks or is target of a spell casted by an enemy. Just my thoughts^^
 
Status
Not open for further replies.
Top