Raised This Month: $535 Target: $400
 133% 

[TF2 & L4D & L4D2] Actions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 02-15-2022 , 08:11   [TF2 & L4D & L4D2] Actions
Reply With Quote #1

Extension provides a natives to hook action event handlers and create custom actions

Notes
  • If two different plugins will try to return different action for same eventhandler last will be chosen.
  • Extension doesn't support late load so after reload you must recreate nextbots
  • All actions are cached by their parent action event handlers

Commands & ConVars
PHP Code:
/* Commands */
ext_actions_dump dumps entities actions
ext_actions_offsets 
prints every hooked function offset
ext_actions_listeners 
dumps actions listeners
ext_actions_list 
dumps every action that manager currently holds

/* ConVars */
ext_actions_debug debugs action propagation (Enable debugDisable debug)
ext_actions_debug_processors Logs processors (-Disabled, -Debug all- function vtable index to debug
Examples


Source code
Attached Files
File Type: zip actions.ext.l4d.zip (400.6 KB, 90 views)
File Type: zip actions.ext.tf2.zip (484.7 KB, 63 views)
File Type: zip actions.ext.l4d2.zip (479.4 KB, 266 views)
__________________
cry

Last edited by BHaType; 11-19-2022 at 19:22.
BHaType is offline
Send a message via AIM to BHaType
Gold Fish
Member
Join Date: Mar 2020
Old 02-16-2022 , 09:45   Re: [L4D2] Actions
Reply With Quote #2

What are the "action" related to? Any actions of survivors and infected (players)?
__________________
-

PHP Code:
public OnClientConnect(int Client) {
    
KickClient(Client"sorry");

Gold Fish is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 02-16-2022 , 21:05   Re: [L4D2] Actions
Reply With Quote #3

Quote:
Originally Posted by Gold Fish View Post
What are the "action" related to? Any actions of survivors and infected (players)?
"Actions" are only related to nextbots. I can't give you full list of game actions since there are to many of them

https://developer.valvesoftware.com/...tBot_Behaviors

Updated
PHP Code:
Fixed InitialContainedAction handler for custom actions 
__________________
cry

Last edited by BHaType; 02-16-2022 at 21:11.
BHaType is offline
Send a message via AIM to BHaType
Gold Fish
Member
Join Date: Mar 2020
Old 02-17-2022 , 04:05   Re: [L4D2] Actions
Reply With Quote #4

Quote:
Originally Posted by BHaType View Post
"Actions" are only related to nextbots. I can't give you full list of game actions since there are to many of them

https://developer.valvesoftware.com/...tBot_Behaviors

Updated
PHP Code:
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");

Gold Fish is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Brexit
Old 02-17-2022 , 05:01   Re: [L4D2] Actions
Reply With Quote #5

This is a blessing thanks for release
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Taipei
Old 02-19-2022 , 17:00   Re: [L4D2] Actions
Reply With Quote #6

If I write
PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <actions> 
then compiler will show error
Code:
//// l4d2_bile_out_nav_negate_action.sp
// 
// D:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting 1.10\include\actions.inc(37) : error 001: expected token: ";", but found "forward"
// D:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting 1.10\include\actions.inc(39) : error 001: expected token: ";", but found "methodmap"
// D:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting 1.10\include\actions.inc(89) : error 001: expected token: ";", but found "<newline>"
//
// 3 Errors.
sm 1.10
__________________
HarryPotter is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 03-02-2022 , 05:18   Re: [L4D2] Actions
Reply With Quote #7

Updated
PHP Code:
Fixed compilation errors for sm 1.10
Allowed to return NULL for InitialContainedAction
Added msvc 
__________________
cry

Last edited by BHaType; 03-02-2022 at 05:18.
BHaType is offline
Send a message via AIM to BHaType
NightlyRaine
New Member
Join Date: Jan 2020
Location: Kansas USA
Old 03-24-2022 , 00:39   Re: [L4D2] Actions
Reply With Quote #8

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 Actionsint entityActionsIteratorCallback callback ); 
And GetName() doesn't seem to work when getting the name of a result action like
PHP Code:
"result.action.GetName()" 
NightlyRaine is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 03-24-2022 , 04:09   Re: [L4D2] Actions
Reply With Quote #9

Quote:
Originally Posted by NightlyRaine View Post
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 View Post
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

Quote:
Originally Posted by NightlyRaine View Post
And GetName() doesn't seem to work when getting the name of a result action like
Just tested and seems to be working fine. Make sure you are not trying to access null action or show code so i can replicate issue.
__________________
cry
BHaType is offline
Send a message via AIM to BHaType
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 03-24-2022 , 04:33   Re: [L4D2] Actions
Reply With Quote #10

Updated
PHP Code:
Fixed crash for nb_move_to_cursor and nb_move_to_position cmds (Thanks to NightlyRaine)
Added new example 
__________________
cry
BHaType is offline
Send a message via AIM to BHaType
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:31.


Powered by vBulletin®
Copyright ©2000 - 2023, vBulletin Solutions, Inc.
Theme made by Freecode