Raised This Month: $32 Target: $400
 8% 

Solved [TF2] Another way to destroy engineer buildings ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Whai
Senior Member
Join Date: Jul 2018
Old 11-04-2018 , 08:11   [TF2] Another way to destroy engineer buildings ?
Reply With Quote #1

I'm looking for if there is another way to destroy engineer buildings, I only know 2 ways :

PHP Code:
SetVariantInt(9999);
AcceptEntityInput(iSentry"RemoveHealth"); 
and
PHP Code:
AcceptEntityInput(iSentry"Kill"); 
What I want is to destroy buildings, not vanish, so I don't use "AcceptEntityInput(iSentry, "Kill");"
__________________

Last edited by Whai; 11-10-2018 at 09:29.
Whai is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 11-04-2018 , 13:30   Re: [TF2] Another way to destroy engineer buildings ?
Reply With Quote #2

SDKHooks_TakeDamage allows you to specify who/what killed it.
Mitchell is offline
Whai
Senior Member
Join Date: Jul 2018
Old 11-04-2018 , 15:18   Re: [TF2] Another way to destroy engineer buildings ?
Reply With Quote #3

I'm doing a damage multiplier plugin like SM Damage but with the sdkhooks version that doesn't works :
Quote:
Originally Posted by AtomicStryker View Post
EDIT:
Added a compiled version, for convenience

EDIT #2:
Hopefully fixed some errors

EDIT #3:
Removed it for now, for having no effect ingame.
My problem is when someone multiply his damage by for example -100000000000 and attack a sentry, the sentry will be unable to being destroy exept with PDA or "AcceptEntityInput(iSentry, "Kill");", after someone tried to destroy the sentry, the sentry has null hp or 0 hp, I can't destroy it with
PHP Code:
SetVariantInt(9999);
AccepEntityInput(iSentry"RemoveHealth"); 
I can just vanish the building, but it doesn't spawn metal like usual when a building get destroyed, so that's why I'm looking for if there is another way to destroy buildings.

I don't see how I can destroy a building with this

Code:
function Action (int victim, int &attacker, int &inflictor, float &damage, int &damagetype, int &weapon, float damageForce[3], float damagePosition[3], int damagecustom);
I use this to "destroy" buildings :
PHP Code:
    if(GetEntProp(iSentryProp_Data"m_iHealth") < 1)
    {
        
AcceptEntityInput(iSentry"Kill");
    } 
[Edit]

I didn't notice you talked about
Code:
native void SDKHooks_TakeDamage(int entity, int inflictor, int attacker, float damage, int damageType=DMG_GENERIC, int weapon=-1, const float damageForce[3]=NULL_VECTOR, const float damagePosition[3]=NULL_VECTOR);
But I don't know what to do with this.
__________________

Last edited by Whai; 11-04-2018 at 15:28.
Whai is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 11-07-2018 , 11:52   Re: [TF2] Another way to destroy engineer buildings ?
Reply With Quote #4

Code:
SDKHooks_TakeDamage(iSentry, 0, 0, 99999.0);
__________________
Benoist3012 is offline
Whai
Senior Member
Join Date: Jul 2018
Old 11-10-2018 , 07:31   Re: [TF2] Another way to destroy engineer buildings ?
Reply With Quote #5

Quote:
Originally Posted by Benoist3012 View Post
Code:
SDKHooks_TakeDamage(iSentry, 0, 0, 99999.0);
Thanks ! it works great, here is what I did for other people that looking for something similar to my problem :

PHP Code:
SetVariantInt(1);
AcceptEntityInput(iSentry"AddHealth");
SDKHooks_TakeDamage(iSentryinflictorattacker9999.0); 
Sorry for the late reply.
__________________
Whai is offline
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 23:02.


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