• 🏆 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] RESOLVED: Boss AI through Hashtable

Status
Not open for further replies.
Level 2
Joined
Oct 16, 2017
Messages
16
First of all I'd like to apologize for the formatting of the images, as shown in the first picture for whatever reason I cannot copy the trigger text as I would like to as the option is grayed out. I also do not have the option available when I simply right click the trigger itself.

Onto what this thread is about. Long and short of what I'm trying to accomplish is make a boss AI that simply cycles through abilities on a set interval through a hashtable. Every second a check is run to see if any of the abilities are at '1' if they are the relevant spell trigger is ran and the hashtable number reset to go through the process again. And if any abilities or phases have say a 30 second channel I can adjust the rest of the abilities to wait the 30 seconds and then continue as usual.

The problem is I can't seem to get the hashtable to work. I'm not sure if its just due to how I'm saving the hashtable or if I'm screwing up the use of Integer A or what.

Any assistance on how to get this working or suggestions/improvements on the idea itself would be appreciated.

I have uploaded a generic test map for reference if my explanation and the trigger pictures were not sufficient.

Edit: I've got it working now I believe I had errors in the hashtable, managed to get it working by using custom script and basing it on script in following thread: Hashtable key = variable (possible?)
 

Attachments

  • a.png
    a.png
    36.9 KB · Views: 36
  • b.png
    b.png
    47.2 KB · Views: 33
  • Boss Combat Test.w3m
    1.8 MB · Views: 30
Last edited:
Level 12
Joined
Mar 13, 2020
Messages
421
Why you want to use a Hashtable?
Why you dont use integreres.. like i did for my Boss Map

a Unit is attacked
Attacked Unit is Bossunit
If random number 1 - 20 less Or equal to 10
Then Order the Ability on attacking Unit or Point or anything you Need
You can set variables before the Order
And Remove Locations also... just a quick Thing to think about worked for me
 
Level 2
Joined
Oct 16, 2017
Messages
16
Why you want to use a Hashtable?
Why you dont use integreres.. like i did for my Boss Map

a Unit is attacked
Attacked Unit is Bossunit
If random number 1 - 20 less Or equal to 10
Then Order the Ability on attacking Unit or Point or anything you Need
You can set variables before the Order
And Remove Locations also... just a quick Thing to think about worked for me

I don't want any RNG behind whether a spell is to be used or not, each attempt at the boss should be almost identical in terms of when abilities are used.
The players would also be able to kite the boss waiting for cooldowns/mana to regenerate if the abilities are only procced when the boss is attacked.

Appreciate the response though mate!
 
Level 12
Joined
Mar 13, 2020
Messages
421
The Event was just an example :) and also you can Turn off with a Loop trigger as Counter to cooldown the trigger, just try to test around and find your way.. was just an example to think different and maybe less complicated for me it worked fine because the players have a timer of 3 minutes and play against the time to for each boss :)
 
Status
Not open for further replies.
Top