I'm trying to convert the witch force attack command you had made for your old l4d2_behavior plugin to this, but I'm not seeing an easy way to do it, as I want to do it on demand and not based on an event.
I got it kind of working but depending on the witch's current action it would not find the action (ActionsManager.GetAction returns INVALID_ACTION), or it would work but then the witch would be stuck on WitchExecAction forever and is unkillable.
In addition, the plugin had gamedata for WitchAttack but behavior doesn't, would I still need that?
I'm trying to convert the witch force attack command you had made for your old l4d2_behavior plugin to this, but I'm not seeing an easy way to do it, as I want to do it on demand and not based on an event.
I got it kind of working but depending on the witch's current action it would not find the action (ActionsManager.GetAction returns INVALID_ACTION), or it would work but then the witch would be stuck on WitchExecAction forever and is unkillable.
Whenever witch spawn her first action is WitchExecAction which creates WitchBehavior which creates WitchIdle/WitchWander (depends on sv_force_time_of_day and witch_force_wander convars) and so on. WitchExecAction and WitchBehavior are her first actions and they are handling her fire and death states you should never change or suspend them until you really want it.
So this is witch actions when she spawned:
WitchExecAction -> WitchBehavior -> WitchIdle/WitchWander/WitchAttack/...
As you can see the best way is to always get next action after WitchBehavior.
You can easily do this by using action child property.
One more note about StorePendingEventResult. I highly recommend to don't use it until next version because for now it keeps default purpose and stores new result without propagating to other actions this can lead to the loss of actions.
Quote:
Originally Posted by jackz
In addition, the plugin had gamedata for WitchAttack but behavior doesn't, would I still need that?
You need gamedata otherwise you won't be able to call the WitchAttack constructor.
- Added Team Fortress 2 support - Added contextual query hooks - Added natives to effectively change event result - Added new convars - Added new commands - Fixed string type args for event handlers - Fixed OnEnteredSpit event handler - Changed StorePendingEventResult to propagate result but it still doesn't respect result priority - Changed from hardcoded offsets to use gamedata
Thanks for extension and TF2 support update.
I've tried to port TF2 version of extension to Insurgency. I guess, their NextBots are based on TF2 version because they have all same functions and offsets as TF2 one, but there's also some INS specific actions. However, server crashes because "OnIntentionReset" function loops and stack overflows.
Code:
actions.ext.2.insurgency.dll!OnIntentionReset()Line 27 C++
actions.ext.2.insurgency.dll!fastdelegate::FastDelegate<void>::InvokeStaticFunction()Line 968 C++
actions.ext.2.insurgency.dll!fastdelegate::FastDelegate<void>::operator()()Line 928 C++
actions.ext.2.insurgency.dll!__SourceHook_MFHCls_OnIntentionReset::CMyDelegateImpl::Call()Line 7 C++
actions.ext.2.insurgency.dll!__SourceHook_MFHCls_OnIntentionReset::Func()Line 7 C++
Any ideas what's cause that? Or maybe you have plans for adding INS and DOI support?
Here's gamedata. The address and signatures are based on what I've seen in TF2 gamedata.
Thanks for extension and TF2 support update.
I've tried to port TF2 version of extension to Insurgency. I guess, their NextBots are based on TF2 version because they have all same functions and offsets as TF2 one, but there's also some INS specific actions. However, server crashes because "OnIntentionReset" function loops and stack overflows.
Any ideas what's cause that? Or maybe you have plans for adding INS and DOI support?
For now I don't plan to add support for INS or DOI, maybe someday. As for crash, it could be anything. I suggest to debug Intention interface to be sure you are hooking right function.