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

[Trigger] Tiki AI

Status
Not open for further replies.
Level 2
Joined
Sep 20, 2015
Messages
13
Hello guys,

I've created a hero voodoo troll with a kind of "minion" who's following him.
(This Minion can't be targeted and killed until the voodoo troll is alive).
And i wanted to create an IA for this minion who reacts at the same time than the voodoo troll. Let's take an example:
- When the voodoo troll attacks a unit, the minion too.
- When the voodoo troll change his target, the minion too.
- And when the voodoo troll stops his attack, the minion too.

I code with the GUI (not the Jass, i'm really bad with xD)

So i've began a kind of IA but i want to optimize it:

  • IA Tiki
  • Events
    • Unit - Voodoo troll receives an order with point for target.
  • Conditions
    • (Current order of Voodoo troll) equals to (Order(attack))
  • Actions
    • Set RandomNumber = (Random real number between -75 and 75)
    • Trigger - Turn on Move Tiki <gen>
And the trigger Move Tiki refers to:

  • Move Tiki
  • Events
    • Time - Every 0.75 seconds of game-time
  • Conditions
  • Actions
    • Unit - Order Tiki to Attack-Move towards ((Position of Voodoo troll) offset by RandomNumber towards 0.00 degrees)
And this trigger does not work to stop the minion (the Tiki)

  • Stop Tiki
  • Events
    • Time - Every 0.60 seconds of game-time
  • Conditions
    • (Order(stop)) equals to (Current order of Voodoo Troll)
  • Actions
    • Trigger - Turn off (Move Tiki)
    • Unit - Order Tiki to Stop

To move the minion, i tried with the order (move) but it doesn't work i don't know why. :goblin_wtf:

Actually the minion follows the troll and attacks his target, but sometimes he's 'buggy', his auto attacks does not reach the target, he's reseting his animations etc... :goblin_jawdrop:
And when the troll runs away from his target, the minion still attack him but i want him to come back to his master lol. :vw_sad:

That'd be very nice if you could help me :)
Thanks guys :)
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
Status
Not open for further replies.
Top