PDA

View Full Version : AI commands



Skarok
May 8th, 2011, 15:48
Hey, I'm sitting on a map, everything works, only the enemy keeper is a problem. Is it possible to give him somehow a different target than other keepers? I want him to attack a hero fortress and capture a specific hero, but even if the only way to other keepers is throgh the fortress he's going to attack me. Can I give him the order to cast call to arms on a selected place? I don't want to use Creature action anymore, so that he possibly casts call to arms.
Thanks for all your answers:)

edit: Problem solved.

DK-Asmodeus
May 9th, 2011, 14:55
It is possible (i think) via the use of triggers, try reading up on the map editor here http://keeper.lubie.org/dk2_docs/dk2_editor_manual.htm it might tell you how to do it.

I gave up on triggers a long time ago, fiddly things that only work when the feel like it for me

DKA

Skarok
May 9th, 2011, 18:43
Yeah, with triggers you can set the time when he should do somethimg. But the problem is, there are no action for the AI to attack somewhere. To make him attack you need to do very complicated things. You can simply place an object and change it to call to arms. Then you need only map actions to change the terrain that his creatures are able to go to call to arms. Then the problem is, he will not be able to remove the object until he places the real call to arms. So, first make him unable to use call to arms. Look in the game how long his creatures need for the attack. After that, make him able to use call to arms and give him a target, a new keeper he can attack. Otherwise you can raise the fight distance for call to arms and then place a few heroes per creature action. For that you have to make lots of tests, but if he finally place his own call to arms then he'll remove it after a moment and he plays normal. Maybe you can give a room the scripts for the call to arms (It works with other objects). Then it would be easy to change the room owner at a special time, so his creatures will attack. After the attack you can change the terrain and use more room tiles for his attacks. I'll try this out tommorow, first I'll finish a few other fings on my maps.