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

TF2 setting Cloak Meter value


Post New Thread Reply   
 
Thread Tools Display Modes
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 09-29-2013 , 08:30   Re: TF2 setting Cloak Meter value
Reply With Quote #11

SetEntPropFloat(ent, Prop_Send, "m_flCloakMeter", val) is what i use.. Pretty much can put whatever yu want in therr and no harm will be done.

Other method works okay too though.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 09-29-2013 at 08:30.
friagram is offline
CoolJosh3k
AlliedModders Donor
Join Date: Mar 2010
Old 10-06-2013 , 23:51   Re: TF2 setting Cloak Meter value
Reply With Quote #12

I tried different values like '-1.0', '1.0' and '10.0'. I cannot seem to get it to work.

PHP Code:
SetEntPropFloat(iProp_Send"m_flCloakMeter"10.0);
TF2_AddCondition(iTFCond_Cloaked, -1.0); 
I have reworked things and it looks like my best option is to make the player model invisible (or mostly transparent), while leaving the weapons/cosmetics normal. Is this still possible and how? I seem to just get a black player model.
CoolJosh3k is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 10-07-2013 , 10:33   Re: TF2 setting Cloak Meter value
Reply With Quote #13

Where are trying to change their cloak meter at? You might have to constantly set it in a post think.
bl4nk is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 10-07-2013 , 16:44   Re: TF2 setting Cloak Meter value
Reply With Quote #14

It only works on spys, and they have to have an invis watch.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
CoolJosh3k
AlliedModders Donor
Join Date: Mar 2010
Old 10-07-2013 , 18:01   Re: TF2 setting Cloak Meter value
Reply With Quote #15

Setting on post think, does seem like it could do the trick.

If it only works for spies, then can we give the other classes the watch or attributes needed? I presume it is not locked to the spy.

I have redone my code and the best solution now, is to have them transparent. Such that we can still see the weapons/cosmetics, but not the player model.

The reason the cloak effect would have been nice, is because of the flickering effect on contact. This would kinda need to be coupled with some particle trail or beacon too, to keep the game play interesting still.

edit:

I had a look at some examples of invisibility and ended up with a rather neat (and working) effect.

PHP Code:
    SetEntityRenderMode(iRENDER_TRANSCOLOR);
    
SetEntityRenderColor(i25525525515); 
This only effects the player model (and things like the vanilla medic's backpack). Colour doesn't appear to change. Large cosmetics, such as the Halloween souls, do show up in full though. It also resets to normal on spawn or deathcam.

I am glad to finally have this working. Thanks everyone for your help.

Last edited by CoolJosh3k; 10-07-2013 at 20:17. Reason: added info
CoolJosh3k is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 10-08-2013 , 08:37   Re: TF2 setting Cloak Meter value
Reply With Quote #16

Spy stuff is not going to work for non spys. Rendermode or color is a better bet.
You can set weapons, wearables, and clients to be transparent, however you can not remove tempents or client side effects.. So unusual hat particles, or arrows stuck in the player will still show. I dont know how to go about removing arrows, for hats and such, you can just kill them if you really need to.

When hiding weapons, make sure that you hide disguise weapons on spies

For transparency you can do 255 255 255 0 if you are rendering alpha, try rendermode_color
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 10-08-2013 at 08:44.
friagram 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 06:38.


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