And does anyone know how Deekin the Kobold Bard in SoH and HotU was handled? I tried to make a different type of creature (goblin) into a henchman similar to Deekin and it was a real mess too.
Looking for Henchman Scripts
#1
Posté 24 février 2011 - 05:00
And does anyone know how Deekin the Kobold Bard in SoH and HotU was handled? I tried to make a different type of creature (goblin) into a henchman similar to Deekin and it was a real mess too.
#2
Posté 24 février 2011 - 05:56
It's in my siggy.
I'm currently working on another as well, but it might be a little bit before I finish it as it belongs to a much bigger project.
Modifié par Xovian, 24 février 2011 - 05:59 .
#3
Posté 26 février 2011 - 05:31
Xovian wrote...
I think my projects has a link to a conversation file that might work for you.
It's in my siggy.
I'm currently working on another as well, but it might be a little bit before I finish it as it belongs to a much bigger project.
Thanks very much, I will check this out.
#4
Posté 28 février 2011 - 04:38
I have a scenario where if the player dies during a battle, they are stripped of all items and gear, dressed in slave clothes and sent to a capture area on respawn. The only problem is, sometimes the henchman keeps on fighting the creatures and mucks up my script because the slave clothes are considered armor [albeit rather uesless armor], and the player cannot equip it during combat. So the player arrives at the capture area naked - though the clothing in question does wind up in their inventory.
I make the enemy creatures stop fighting via
the SurrenderAllToEnemies() function as soon as the Player dies, and I put a clear
actions on the henchman as well. Most of the time it works, but occasionally I get that annoying scenario as mentioned above. I tried killing the henchman when the Player dies, but that separates the two and then the henchman isn't transported to the new area with the Player. Maybe if I use GetFormerMaster() and then the area the former master is in to send the henchman there...?
Just one of a couple henchman problems that's making me want to pull my hair out...
#5
Posté 28 février 2011 - 06:41
One way is to just use the ClearActions(TRUE); requires the include script *_*_Henai as ClearActions is a wrapper function of ClearAllActions, but the latter can be buggy sometimes.
By using the TRUE, it will break the henchman combat, where as FALSE ignores the state of combat.
The most effective is to include a section in the OnHeartBeat:
The main key to have and use is the: (GetAssociateState(NW_ASC_IS_BUSY...//This is what I use.
// If not runnning normal or better AI then exit for performance reasons
if(GetAILevel() == AI_LEVEL_VERY_LOW)
{
return;
}
// If doing any of these actions, do nothing.
int iAct;
iAct = GetCurrentAction();
if(iAct==ACTION_CASTSPELL || iAct==ACTION_HEAL || iAct==ACTION_ITEMCASTSPELL || iAct==ACTION_WAIT
|| iAct==ACTION_REST || (GetAssociateState(NW_ASC_IS_BUSY, OBJECT_SELF)==TRUE) || (GetIsDead(OBJECT_SELF)))
{
return;
}
In your script you can SET the associate state to busy after the ClearActions function.
The henchman will stay busy and any other scripts that would normally fire will fail because the busy command stops them, and things like perceived or even damage wont change the state because they are marked as busy.
Just make sure after the script you want to fire has happened you set them not being busy (set to false) or they will not even talk to the player or anything else. Easy to do with a DelayCommand, just have a few seconds set for the script to run and poof they become non-busy and act as normal. Honestly, it probably isnt needed in the onheartbeat event to return, just having it work on the script you want is probably enough, but i use it for completeness sake.
As to why I have the GetIsDead used there, I use Tony K's AI in several mods, inclluding the one I'm building. NPC's will still "taunt" even when dead with out it, unless their corpses fade, which mine dont..
Modifié par Xovian, 28 février 2011 - 06:49 .
#6
Posté 02 mars 2011 - 06:25
What is this AI you're referring to? I've seen it mentioned before, but I was never sure of exactly what it was...is it just for henchmen, or for all NPCs?
Modifié par Zejan the Wonder Monkey, 02 mars 2011 - 06:27 .
#7
Posté 02 mars 2011 - 07:00
#8
Posté 11 mars 2011 - 11:52
Xovian wrote...
Check here
Check the descriptions of each as there are several versions and types.
Again, I thank you. Truly.
Nothing is more frustrating than a henchie who won't cooperate.





Retour en haut






