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

[TF2] Sentry Max Health in MVM


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BrianGriffin
Senior Member
Join Date: Oct 2008
Old 10-08-2012 , 08:57   [TF2] Sentry Max Health in MVM
Reply With Quote #1

Before we could just rely on the Sentrys max HP being a constant - now with MVM that number can change according to the Engi level.

Is there any way to check for the max Health of a sentry? Query the Engineer upgrades or something? My first instinct would be to keep the builder and all his buildings somewhere and run a timer each 0.1s to check if any building has a higher health and then store that as new maxhealth.
BrianGriffin is offline
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 10-08-2012 , 19:18   Re: [TF2] Sentry Max Health in MVM
Reply With Quote #2

Code:
CObjectSentrygun:
  -Member: m_iMaxHealth (offset 228) (type integer) (bits 14)
PHP Code:
new MaxHP GetEntProp(SentryIndexProp_Send"m_iMaxHealth"); 
Doesn't that work?
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
MasterOfTheXP is offline
BrianGriffin
Senior Member
Join Date: Oct 2008
Old 10-09-2012 , 14:59   Re: [TF2] Sentry Max Health in MVM
Reply With Quote #3

Aaah... do you ever feel like you're having one of these days...? That day must have been one of mine %D... Many thanks.

What's weird though: They "buffed" the Sentry health in the MVM update from 216 to 217, m_iMaxHealth still returns 216 though (and if you upgrade your building health it will always be 1 less than what is displayed on the sentry...) - slightly weird but no problem !
BrianGriffin is offline
Reply



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:01.


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