Raised This Month: $12 Target: $400
 3% 

Solved [L4D2] How to force a witch climb over something?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Paimon
Member
Join Date: Jul 2021
Location: Zootopia
Old 06-30-2023 , 12:29   Re: [L4D2] How to force a witch climb over something?
Reply With Quote #2

I have found a function to give witch acceleration, this makes witch could get velocity perfectly!!
Code:
// ZombieBotLocomotion::SetAcceleration(Vector const&)
// Offsets: 97 - Windows; 98 - Linux
// For velocity z, witch must not on ground, so you need tp first.
void SetWitchAcceleration(int entity, const float acceleration[3])
{
    Address locomotion = GetLocomotion(entity);
    if(locomotion == Address_Null) return;

    float vector[3];
    AddVectors(NULL_VECTOR, acceleration, vector);
    ScaleVector(vector, 100.0); // by times 100, acceleration seems to be velocity
    SDKCall(g_hSetAcceleration, locomotion, vector);
}
Thanks to @BHaType's GetLocomotion()

Last edited by Paimon; 07-01-2023 at 01:49.
Paimon is offline
 



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 15:52.


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