ai help

Level 4
Joined
Feb 28, 2025
Messages
27
Hello guys i really need help...
I've created periodic waves of units on my map that fight other waves... But these units only use automatic spells and not all their abilities. How can I make them use their other abilities? Does i have to do a IA ? If yes what does it loke like? I don't now how to do ai like this x)
Always thanks :)



PS:
(if you what to see what i have already done i can give you pictures of the triggers and of the map...)
 

This is the list of casting behaviours for the AI based on the base ability.
 
Level 4
Joined
Feb 28, 2025
Messages
27

This is the list of casting behaviours for the AI based on the base ability.
Thanks :); I also have custom spells :/ I just want to create an AI that uses spells… No need to produce units or build. I just want it to be a bit like the AI in Frozen Throne's human mission 4, where the naga and blood elves fight the night elves . The AI script of this mission is that , but I don't know how to adapt it to my map.


globals
constant integer USER = 1
endglobals

function main takes nothing returns nothing
call CampaignAI(HOUSE,null)
call SuicideUnitsEx( USER, NAGA_MYRMIDON, NAGA_SIREN, NAGA_DRAGON, HIGH_SWORDMAN, HIGH_ARCHER, SORCERESS, PRIEST, SPELL_BREAKER, 'ncfs', NAGA_ROYAL)
endfunction

PS: If you can do something i can show the map if you whant....
 
Last edited:
Level 21
Joined
Mar 16, 2008
Messages
955
My best answer to get AI to use custom spells is to have the custom spell base ability be similar behavior or use condition to the list Footman16 linked. Short of that there might be some complicated way to put it in the script to order some behavior but that's too complicated imo. Besides that maybe just have the wave units controlled by a cpu not running an AI script and trigger the ability use.
 
Level 4
Joined
Feb 28, 2025
Messages
27
My best answer to get AI to use custom spells is to have the custom spell base ability be similar behavior or use condition to the list Footman16 linked. Short of that there might be some complicated way to put it in the script to order some behavior but that's too complicated imo. Besides that maybe just have the wave units controlled by a cpu not running an AI script and trigger the ability use.
Oki doki :) so how can i do that? ^^ do you whant to see the map ?
 
Level 21
Joined
Mar 16, 2008
Messages
955
Well not right now but feel free to post it and I can open it if I have time.

What does the custom ability that the AI is not using do? and what ability is that custom ability based on?
 
Level 4
Joined
Feb 28, 2025
Messages
27
Well not right now but feel free to post it and I can open it if I have time.

What does the custom ability that the AI is not using do? and what ability is that custom ability based on?
ooooo thank you !!! Just a stupid question but if my map has custom model can you open it? Well, at worst, I just take them off to share the rest.

The map is for a campaign that I'm doing with a friend in which he plays player 2, I'm player 1 and I'm like a master of the game x). If you try the map you can see i can control everything and the neutrals factions ony use their auto spells
(I am french so some things are in french)
 
Level 21
Joined
Mar 16, 2008
Messages
955
Yes should be fine with custom models since they are imported to the map file, I assume. But I don't want to open it right now. I think I can explain how to fix the problem if you tell me 1) what the custom ability does, 2) what base ability the custom ability is based on.
 
Level 4
Joined
Feb 28, 2025
Messages
27
Yes should be fine with custom models since they are imported to the map file, I assume. But I don't want to open it right now. I think I can explain how to fix the problem if you tell me 1) what the custom ability does, 2) what base ability the custom ability is based on.
i post the map ... the abilities are based on: misha , infernal again infernal , berserker, and the dread lord shokwave abilities. After there is a lot of common abilities with common units but the units never use them by themselves
the abilities based on misha spawned dragons, the abilities based on infernal only created the infernal birth and the enemmies units take damages, the other infernal is another model of the infernal, berserk is berserk abilities but not with the same texture and the last one is a shocwave but with the naga wave model
 
Last edited:
Thanks :); I also have custom spells :/ I just want to create an AI that uses spells… No need to produce units or build. I just want it to be a bit like the AI in Frozen Throne's human mission 4, where the naga and blood elves fight the night elves . The AI script of this mission is that , but I don't know how to adapt it to my map.


globals
constant integer USER = 1
endglobals

function main takes nothing returns nothing
call CampaignAI(HOUSE,null)
call SuicideUnitsEx( USER, NAGA_MYRMIDON, NAGA_SIREN, NAGA_DRAGON, HIGH_SWORDMAN, HIGH_ARCHER, SORCERESS, PRIEST, SPELL_BREAKER, 'ncfs', NAGA_ROYAL)
endfunction

PS: If you can do something i can show the map if you whant....
The thread Footman linked also applies to custom spells. For example, if a custom spell is based on Rain of Fire, the AI will use it like how it will use Rain of Fire and so on.
 
Level 4
Joined
Feb 28, 2025
Messages
27
The thread Footman linked also applies to custom spells. For example, if a custom spell is based on Rain of Fire, the AI will use it like how it will use Rain of Fire and so on.
Ok that's nice :) but the big problem is i don't now how to do an ai who works correctly ^^". And here he just have to cast spells... Because the created waves of units directly go to fight.
 
 
Level 4
Joined
Feb 28, 2025
Messages
27
ok thanks but in this map it is like a computer use spells for the player, i just wan't to do an IA who take in this control the created units and also the units controled buy an AI use spells (there is not custom spells)...
 
Level 4
Joined
Feb 28, 2025
Messages
27
or where is a way to order a unit to cast a spell with conditions and triggers?
 
Top