View Full Version : [TF2]About overlay
I want to overlay vtf to players when they are stunned.
I think I can check stunned
But how can overlay pictures to player?
if(TF2_GetPlayerCondictionFlags(target) & TF_STUNFLAGS_GHOSTSCARE)
{
What should I do in here?
}
pheadxdll
01-30-2012, 11:32
if(TF2_GetPlayerCondictionFlags(target) & TF_STUNFLAGS_GHOSTSCARE)
{
What should I do in here?
}
Won't work, you should do:
if(TF2_IsPlayerInCondition(client, TFCond_Dazed))
{
}
I would do my check here:
public TF2_OnConditionAdded(client, TFCond:condition)
{
if(condition == TFCond_Dazed)
{
// Show overlay here
}
}
As for the overlay, you could use the client command r_screenoverlay to put an image on a client's screen.
Dr. McKay
01-30-2012, 12:27
ClientCommand(client, "r_screenoverlay path/to/overlay/relative/to/materials.vmt");
ClientCommand(client, "r_screenoverlay 0"); // cancels it
napalm00
01-30-2012, 12:38
^Won't work as you need to set the command flags, removing the cheat ones real quick, calling the command and resetting the command flags right after.
SetCommandFlags("r_screenoverlay", GetCommandFlags("r_screenoverlay") & ~FCVAR_CHEAT);
ClientCommand(client, "r_screenoverlay path/relative/to/materials/folder/myoverlayname");
SetCommandFlags("r_screenoverlay", GetCommandFlags("r_screenoverlay") | FCVAR_CHEAT);
"r_screenoverlay" without any argument will remove the overlay. The file extension (.vmt) is also not needed in the command.
last time i checked (long long time ago) you could do r_screenoverlay on clients without cheats on, well in css anyway.
Dr. McKay
01-30-2012, 15:15
last time i checked (long long time ago) you could do r_screenoverlay on clients without cheats on, well in css anyway.
^ This
I just did this last night in TF2. And r_screenoverlay 0 worked to remove it, without any args would probably work too.
Calystos
07-08-2012, 11:52
Is it at all possible to have more than 1 overlay in place at one time via r_screenoverlay?
psychonic
07-08-2012, 12:17
Is it at all possible to have more than 1 overlay in place at one time via r_screenoverlay?
No.
Calystos
07-08-2012, 12:22
No.
Wasn't sure if it was or not. Didn't think it was as was testing some stuff out to no avail. Plus had been researching & reading up on it and hadn't located anything along the lines I was after.
Any way around it, like alternate means to display things?
As was trying to sort out an idea I had to update FlaminSarge's [TF2] Ghost Mode (http://forums.alliedmods.net/showthread.php?t=183266) so that when you died it had both the wobbly screen ghost mode effect but also made the screen black & white so you knew you were dead (kinda like when you died in other games such as WoW, etc).
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.