AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   TF2 setting Cloak Meter value (https://forums.alliedmods.net/showthread.php?t=67699)

friagram 09-29-2013 08:30

Re: TF2 setting Cloak Meter value
 
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.

CoolJosh3k 10-06-2013 23:51

Re: TF2 setting Cloak Meter value
 
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.

bl4nk 10-07-2013 10:33

Re: TF2 setting Cloak Meter value
 
Where are trying to change their cloak meter at? You might have to constantly set it in a post think.

friagram 10-07-2013 16:44

Re: TF2 setting Cloak Meter value
 
It only works on spys, and they have to have an invis watch.

CoolJosh3k 10-07-2013 18:01

Re: TF2 setting Cloak Meter value
 
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.

friagram 10-08-2013 08:37

Re: TF2 setting Cloak Meter value
 
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 :3

For transparency you can do 255 255 255 0 if you are rendering alpha, try rendermode_color


All times are GMT -4. The time now is 14:37.

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