Raised This Month: $ Target: $400
 0% 

Solved [L4D2] Survivors with Special Infected Weapons?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
philipjfry
Junior Member
Join Date: Sep 2019
Location: Somewhere in europe
Old 10-18-2020 , 16:45   [L4D2] Survivors with Special Infected Weapons?
Reply With Quote #1

https://www.youtube.com/watch?v=kqfv...nnel=Pelipoika

Anyone know what netprops need to be set for similar result after equipping 'weapon_tank_claw' or 'weapon_charger_claw' to be able to use SI abilities as a survivor?

Edit: I need to set the "m_customAbility" of an SI to a survivor client index, How to do so?

Last edited by philipjfry; 10-20-2020 at 13:02. Reason: more info
philipjfry is offline
xerox8521
Senior Member
Join Date: Sep 2011
Old 10-19-2020 , 16:14   Re: [L4D2] Survivors with Special Infected Weapons?
Reply With Quote #2

You probably need to create the ability first with CreateEntityByName.
Those are the abilities used by the game:

- ability_tongue
- ability_selfdestruct // Boomer Exploding
- ability_vomit // Actual boomer vomit
- ability_lunge // Hunter Pounce
- ability_spit
- ability_leap // Jockey Leap
- ability_charge
- ability_throw

Once created you can set them with SetEntPropEnt(client, Prop_Send, "m_customAbility", ability);

Not sure if you need to set more but this should do.

Last edited by xerox8521; 10-19-2020 at 16:15.
xerox8521 is offline
philipjfry
Junior Member
Join Date: Sep 2019
Location: Somewhere in europe
Old 10-19-2020 , 18:32   Re: [L4D2] Survivors with Special Infected Weapons?
Reply With Quote #3

Quote:
Originally Posted by xerox8521 View Post
You probably need to create the ability first with CreateEntityByName.
Those are the abilities used by the game:

- ability_tongue
- ability_selfdestruct // Boomer Exploding
- ability_vomit // Actual boomer vomit
- ability_lunge // Hunter Pounce
- ability_spit
- ability_leap // Jockey Leap
- ability_charge
- ability_throw

Once created you can set them with SetEntPropEnt(client, Prop_Send, "m_customAbility", ability);

Not sure if you need to set more but this should do.
Thanks, didn't seem to work from my test though (still can't charge with the charger claw weapon), here is what i tried:

PHP Code:
int wp_index GivePlayerItem(client"weapon_charger_claw");
if (
wp_index == -|| !IsValidEntity(wp_index))
  return;

EquipPlayerWeapon(clientwp_index);

int ability CreateEntityByName("ability_charge");
if (
ability != -1)
{
    
DispatchSpawn(ability);
    
SetEntPropEnt(abilityProp_Data"m_hOwnerEntity"client);
    
SetEntPropEnt(clientProp_Send"m_customAbility"ability);

philipjfry is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Location: Methamphetamine
Old 10-20-2020 , 04:03   Re: [L4D2] Survivors with Special Infected Weapons?
Reply With Quote #4

Perhaps, in order for some abilities to work, you still need to change the player model ( in particular, for the tank's ability )

__________________
Heart
cry
BHaType is offline
Send a message via AIM to BHaType
philipjfry
Junior Member
Join Date: Sep 2019
Location: Somewhere in europe
Old 10-20-2020 , 13:07   Re: [L4D2] Survivors with Special Infected Weapons?
Reply With Quote #5

Quote:
Originally Posted by BHaType View Post
Perhaps, in order for some abilities to work, you still need to change the player model ( in particular, for the tank's ability )

Thx, this worked okay. what is the name of that 'VIRTUAL' address you are using btw?
philipjfry is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Location: Methamphetamine
Old 10-20-2020 , 20:20   Re: [L4D2] Survivors with Special Infected Weapons?
Reply With Quote #6

VIRTUAL is just a offset to get "CBaseAbility::OnCreate"
__________________
Heart
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 01:30.


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