• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[AI] Need help on making AI use custom spells based on channel

Status
Not open for further replies.
Level 6
Joined
Jun 14, 2008
Messages
176
[Solved]Need help on making AI use custom spells based on channel

Edit: Nvm, I solved all problems. If anyone is interested, I post the triggers I used below.

I have a few custom spells based on channel that I want to give to computer heroes so they can use it.

Abilities:
1. Burrow Spike(Using emjlr3's Burrowspike) - It's based on channel, and it's a point or unit target ability.

It's basically an Impale + Blink come spell but I don't need the computer to use this ability to escape or anything, just to use it to attack only.

2. Epic center - Also based on channel. It's a no target ability.

It has 2 second casting time, after casted, causes a bunch of "Thunder Claps" to happen every second for a duration.

Can anyone help me on making triggers for the AI to know and detect when to use those abilities? GUI would be preferred, but Jass is also fine.

BTW, I don't need the it to be MUI or anything, there's only going to be one "Sandking" in my map.

Also, if possible, could it be made so that the AI will "likely"(but not always) use Epic Center after it used Burrowspike?

But I don't really need this, but if someone doesn't mind making it do this also.


Also, this is unrelated, but does anyone know which model or special effect "Sandstorm"(Sandking's ability in DotA) uses?

It's just a bunch of brown/orangish colored sand, I don't know which model it is.

Any help will be appreciated.

Edit: Nvm, I got a trigger to work, also found out the sand is from "Impale Target" model.

  • DetectForCustom
    • Events
      • Time - Every 7.00 seconds of game time
    • Conditions
      • (HeroSandKing is alive) Equal to True
    • Actions
      • Set SandKingPoint = (Position of HeroSandKing)
      • Set EnemyCustomGroup = (Units within (300.00 + ((Real((Level of Burrowstrike for HeroSandKing))) x 100.00)) of SandKingPoint matching ((((Matching unit) belongs to an enemy of (Owner of HeroSandKing)) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Set EnemyCustomPosition = (Position of (Random unit from EnemyCustomGroup))
      • Unit Group - Pick every unit in EnemyCustomGroup and do (Actions)
        • Loop - Actions
          • Unit - Order HeroSandKing to Undead Crypt Lord - Impale EnemyCustomPosition
          • Wait 1.00 seconds
          • Custom script: call DestroyGroup(udg_EnemyCustomGroup)
          • Custom script: call RemoveLocation(udg_SandKingPoint)
          • Custom script: call RemoveLocation(udg_EnemyCustomPosition)
For Epic Center, I made it based off of Starfall instead(So the hero will use it automatically), and made it so anytime it activates Starfall, to turn off the Burrowspike detectiong trigger(since if you don't, it might use Burrowspike while channeling). Once Epic Center is activated, it turns back on the burrowspike detection trigger.
 
Last edited:
Status
Not open for further replies.
Top