// Logs every action/behavior/component allocation or deallocation // Used to track memory leaks // 1 - Enable memory debug, 0 - Disable memory debug ext_actions_debug_memory "0"
Commands
PHP Code:
ext_actions_dump - Dumps every nextbot actions to console.
How to use
PHP Code:
forward void OnActionCreated( BehaviorAction action, int actor, const char[] name );
Usually every use case should start from forward above. This forward notifies whenever entity got a new action but without actual transition yet.
That means action is constructed by the corresponding constructor and still hasn't been updated or started yet.
At this point you just hook any event handler and change it code execution as you want.
public Action Suspendable_Update(BehaviorAction action, int actor, float interval, ActionResult result) { action.Update = INVALID_FUNCTION;
int approach_target; if (ActionsManager.GetActionUserData(action, "approach_target", approach_target)) { if ((approach_target = EntRefToEntIndex(approach_target)) <= 0) return Plugin_Continue;
public Action SurvivorApproach_Update(BehaviorAction action, int actor, float interval, ActionResult result) { float origin[3], goal[3]; GetClientAbsOrigin(actor, origin);
if (!ActionsManager.GetActionUserDataVector(action, "survivor_approach_goal", goal)) { int target = EntRefToEntIndex(action.GetUserData("survivor_approach_target"));
- Fixed InitialContainedAction handler for custom actions
I understand that with the help of your extension, can force a tank to attack a certain player or make him just stand still or run away from players or even make zombie friends for a survivors, I understand that the extension gives full control over the intelligence of entities that is embedded in the game engine?)
__________________
-
PHP Code:
public OnClientConnect(int Client) {
KickClient(Client, "sorry");
}
Using nb_move_to_cursor and nb_move_to_position seems to crash when a bot is spawned in when using this amazing extension.
And I for the life of me can not figure out how to use or what this is even supposed to do, Am somewhat new to messing with plugins at times. Any help on what it is supposed to do and how to use would be amazing!
PHP Code:
/* Used to iterate through all entity actions */
public static native void Actions( int entity, ActionsIteratorCallback callback );
And GetName() doesn't seem to work when getting the name of a result action like
Using nb_move_to_cursor and nb_move_to_position seems to crash when a bot is spawned in when using this amazing extension.
Thanks for report. Fixed
Quote:
Originally Posted by NightlyRaine
And I for the life of me can not figure out how to use or what this is even supposed to do, Am somewhat new to messing with plugins at times. Any help on what it is supposed to do and how to use would be amazing!
It will give every action that passed entity contains. There is no way to legally create ArrayList via extension so that's the only way how can you pass multiple objects without creating your own handle type.
How to use
PHP Code:
#pragma semicolon 1
#pragma newdecls required
#include <sdktools>
#include <actions>
public void OnPluginStart()
{
RegConsoleCmd("sm_actions", sm_actions);
}
public Action sm_actions( int client, int args )
{
int target = GetClientAimTarget(client, false);