This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Have Minisentry not start at full health


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Trotim
Junior Member
Join Date: Mar 2011
Old 01-22-2013 , 11:01   Have Minisentry not start at full health
Reply With Quote #1

So so far using SDKHooks I hooked "player_builtobject" and can check if the built building is a Sentry and if it has m_bMiniBuilding=1 which means it is a Minisentry. I also managed to successfully access its maxHealth via
Code:
SentryMaxHealth = FindSendPropOffs("CObjectSentrygun", "m_iMaxHealth");
[...]
SetEntData(object, SentryMaxHealth, 90);
and all that for example works fine.

Now the problem is that I want to change its actual health when it starts building. In particular I'd like to set it so it behaves like every other Engineer building - start at 1 HP and linearly increase to its max health when it finishes building. The Minisentry however keeps resetting its m_iHealth to full no matter what I change it to.

How do I get Minisentries to not constantly reset their health to full while building? And is there some hidden cvar affecting this?
Trotim 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 15:46.


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