Aller au contenu

Photo

Custom attack script hook in to AI


  • Veuillez vous connecter pour répondre
11 réponses à ce sujet

#1
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
I am pretty sure that the default AI provides a hook for inserting custom attack scripts.  I just don't remember how this works.  Any help is appreciated.

#2
kevL

kevL
  • Members
  • 4 074 messages
See

( among others )

#3
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Many thanks. I'm going to try this out. I'll let you know how it goes.

#4
kevL

kevL
  • Members
  • 4 074 messages
k, me curious too.

#5
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
It did the damage, but didn't play the animation.

#6
kevL

kevL
  • Members
  • 4 074 messages
// wrapper for PlayCustomAnimation(), so that it works
void PlayCustomOneShotAnimation(object oObject, string sAnimation, float fSpeed)
{
  PlayCustomAnimation(oObject, sAnimation, 0, fSpeed);
}


heh :|

Edit, you may have to alter this line in 'nw_s1_dragcold'

  PlayCustomAnimation(OBJECT_SELF, "Una_breathattack01", 0, 0.7f);


and wrap it up.


Edit2, if it's not that i Imagine it has something to do with .sefs in .hak files & that's outta my league ..

Modifié par kevL, 09 octobre 2011 - 03:47 .


#7
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
I changed the script to include some of DannJ's code. Now I can get the animation, but the damage is only about 3d6. Also, when the breath weapon is used, the dragon also uses its claw attack in the same round.

#8
kevL

kevL
  • Members
  • 4 074 messages
How many hitDice is the dragon?

the script says a 20hd dragon should do 12d10 on a failed save (with no Evasions) - that's what ~66 pts. All i can say is two things: one i was having issues with bCheat lowering CasterLevel, but this here is based off GetHitDice( ) and shouldn't be affected that way. Two is that every once in a while my Red would smoke for ~500 pts ....

As for the extra claw attack, play around with the CastSpell parameters, specially try turning off bInstant ( put FALSE at the end ) and see if that negates an ornery attack (my attitude is honestly that dragons have been so wimped out they *should* get a breath/claw in the same round ...)


PC have any cold immunity/resistances?

#9
kevL

kevL
  • Members
  • 4 074 messages
oh, here's something else you could try re. extra attack:

put this line into the scope, at the end of


if ( [success] )
{
// ...

  SetCreatureOverrideAIScriptFinished();
}



i think that stops DCR dead in its traks.

#10
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Yes that worked. I changed the code some more, and used more of Dann's script. Now the damage amount is good, but the script makes it do double damage. Everything else looks great. Its getting there.

#11
kevL

kevL
  • Members
  • 4 074 messages
right-o, Matt, look forward to playing it someday,

#12
M. Rieder

M. Rieder
  • Members
  • 2 530 messages

kevL wrote...

right-o, Matt, look forward to playing it someday,



Someday is right!  Sometimes I feel like it is taking forever.  I'm actually getting very near the end and think that unless something goes horribly awry that a release around new years is very realistic.  Thanks for all the help!