Basically, some guards attack you and fight for a while, but before they die they flee the battle. The player shouldn't be able to kill them all -- it might be interesting to have a system flexible enough that a few could be killed while most get away, but the most important thing story-wise is that they run away and the player isn't completely butchering them.
Right now I'm enabling the surrender variable on my creature, and then having a conversation run on surrender with some ambient dialog I want ("Run Awaay!" and so on,) and then I'm giving the end node of that conversation a simple script:
void main()
{
object oGuard = OBJECT_SELF;
UT_QuickMoveObject(oGuard, "0", TRUE, FALSE, TRUE, FALSE);
}
I'm also setting the creature to be immortal, so it will surrender when it reaches 0 health but won't die. The only thing I have left to fix is that I want groups of creatures to attack, and only run away on an individual basis, when they've taken some damage. What I'm going to try is to make several similar creatures and give each of them their own group, which hopefully will make one creature's surrender not affect the other creatures.
This seems a little awkward to me, and I wonder if there's a better way? I do want them all to have different faces though, so maybe creating seperate creatures is the way to go...
Should I be using surrender plot flags and running the scripts off of those, or writing a script to replace CREATURE_CORE on the creature to listen for a surrender event on each creature, and do the running away function there?
*edit*
Oh, and the last possibility I can think of is that there seems to be some scripting for creatures who are supposed to retreat in the singleplayer game. I think it's related to custom AI stuff.
For example:
lot100cr_hurlock_emissary.nss has a function Emissary_ActivateRetreat() which I'm looking at now.
Thanks for reading,
Alex
Modifié par Talisander, 18 juillet 2010 - 09:42 .





Retour en haut






