Page 1 of 1

Action States

Posted: Wed Jul 24, 2013 7:59 pm
by thefoof
I'm going to make a suggestion and you guys can let me know whether or not you think it's a good idea.

I think we should start over-riding action states while in combat. Setting no action state, I'm fairly sure they do this on live. Currently if I have a spawn that has an animation such a mining or something, the spawn will continue that animation during combat which doesn't look right. Which means you have to handle every spawn like this through spawn script.

Basically what I'm saying is, visual state should stay as is, but action states should be changed during combat.

The reason I bring this up now is we have more people starting to work on content, so if we make this change would rather everybody deving content keep this in mind when setting spawn states, rather than going back to change it later.

I can look at setting this up myself just want approval before I do anything.

Re: Action States

Posted: Thu Jul 25, 2013 9:28 am
by John Adams
I definitely do not think it should be handled in scripting. Lethal fixed this for Hailing a spawn when they were an armorer (for example) years ago. I had never noticed that a mining/forging NPC still did those actions once engaged in combat. If they do (now), then it must have gotten broken more recently.

Unless the way LE implemented it was to stop the states in any interactive scripting like Hail or Attack? Check out his code around the Hail functions, maybe you can determine what he did. Or if it no longer works.

Re: Action States

Posted: Fri Aug 09, 2013 6:16 am
by thefoof
Just posting this to say I implimented this check today with a couple minor bug fixes as well. I wasn't able to find the code you mentioned so it must have got written over at some point. (Or I just didn't see it :wink: )

I put this check in NPC code where the incombat bool value gets triggered, it seems to work pretty well.

So, anyone deving content, if an npc has a persistent animation you want to stop in combat just set it as an action state. And if you want it to persist through combat set it as a visual :mrgreen: