PDA

View Full Version : [K1] ActionRandomWalk Woes 2


e-varmint
07-04-2008, 09:21 AM
How do I script a character to interrupt the ActionRandomWalk and/or waypoint walking when engaged in combat?

I have searched and searched for the original thread where someone answered this before, but I cannot find it.

glovemaster
07-04-2008, 09:51 AM
AssignCommand(object oCreature, ClearAllActions());
Will stop what every the character is doing.

e-varmint
07-04-2008, 09:59 AM
AssignCommand(object oCreature, ClearAllActions());
Will stop what every the character is doing.

Perfect! I am going to kill the creatures in question anyway, so there is no need for them to be able to resume their waypoints.

I assume that I will need to perform a "get" or "if" function to determine whether the creature is engaged in combat, then apply your command?

Edit: Or, I could just make this an "on noticed" or "on disturbed" script.

Thanks!!!!!

glovemaster
07-04-2008, 10:23 AM
"onDamaged" is more likely to be of use.
I suggest you also end your script with the line:
ExecuteScript("k_def_damage01", OBJECT_SELF, 1006);
This will then execute the usual script for on damaged.

e-varmint
07-04-2008, 12:33 PM
"onDamaged" is more likely to be of use.
I suggest you also end your script with the line:
ExecuteScript("k_def_damage01", OBJECT_SELF, 1006);
This will then execute the usual script for on damaged.

I agree completely. Thanks again for your help, this saved me a great deal of aggravation!