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

TF2 Sprite


Post New Thread Reply   
 
Thread Tools Display Modes
404UserNotFound
BANNED
Join Date: Dec 2011
Old 11-17-2014 , 00:49   Re: TF2 Sprite
Reply With Quote #11

Why not somehow convert the sprite into a particle and use the CreateParticle thingy?

I know there's a custom particle plugin on here somewhere...

Last edited by 404UserNotFound; 11-17-2014 at 00:49.
404UserNotFound is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 11-17-2014 , 01:09   Re: TF2 Sprite
Reply With Quote #12

Quote:
Originally Posted by Skippy View Post
Wouldn't that result in the same thing as OnGameFrame?
When I was running some tests on a test server between OnGameFrame & OnPostThink/OnPreThink, the SDKHooks seem to run a bit smoother.

The only solid way you can do this seamlessly would be to update server/client lerp, create a particle and have it just hover above player's heads OR figure out a way to use an attachment to clients for sprite entities.
Drixevel is offline
Plaffy46
Junior Member
Join Date: Mar 2014
Old 11-17-2014 , 14:31   Re: TF2 Sprite
Reply With Quote #13

Well, I'm pretty sure the code used in zombie fortress besides some eventual updates and changes should work.

I often go on a server running this plugin, and zombies still have the particle effect attached to their head, and it's smooth. Check by yourself, the IP is 185.16.84.180:27045, when on the server, go zombie select "Rage" as perk for example and call for medic, then look at the flames on your head and try moving (the best way is probably conga to move while staying in thirdperson, i guess).

If it works for particles, there are no reason this shouldn't work for sprites right?
Plaffy46 is offline
Skippy
Senior Member
Join Date: Nov 2011
Old 11-17-2014 , 21:08   Re: TF2 Sprite
Reply With Quote #14

I'm spawning the sprite just fine but the second I add this coding
Code:
SetVariantString(szTemp);
AcceptEntityInput(ent, "SetParent", iClient, ent);
It doesn't show up anymore
__________________
Plugins:
[Any] Aim Menu

Want a TF2 plugin? Feel free to pm me to discuss it.

Last edited by Skippy; 11-17-2014 at 21:08.
Skippy is offline
Skippy
Senior Member
Join Date: Nov 2011
Old 11-19-2014 , 19:39   Re: TF2 Sprite
Reply With Quote #15

Any help with the above post?
__________________
Plugins:
[Any] Aim Menu

Want a TF2 plugin? Feel free to pm me to discuss it.
Skippy is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 11-19-2014 , 20:03   Re: TF2 Sprite
Reply With Quote #16

Quote:
Originally Posted by Skippy View Post
Any help with the above post?
Gonna need more code than that to help figure out what's going on.
404UserNotFound is offline
Skippy
Senior Member
Join Date: Nov 2011
Old 11-19-2014 , 20:27   Re: TF2 Sprite
Reply With Quote #17

Quote:
Originally Posted by abrandnewday View Post
Gonna need more code than that to help figure out what's going on.
Code:
stock CreateSprite(iClient, String:sprite[], Float:offset)
{
	
	new String:szTemp[64]; 
	GetClientName(iClient, szTemp, sizeof(szTemp));

	new Float:vOrigin[3];
	GetClientAbsOrigin(iClient, vOrigin);
	vOrigin[2] += offset;
	new ent = CreateEntityByName("env_sprite_oriented");
	new String:sprite_name[128];
	Format(sprite_name, sizeof(sprite_name), "Sprite%i", ent);
	if (ent)
	{
		DispatchKeyValue(ent, "model", sprite);
		DispatchKeyValue(ent, "classname", "env_sprite_oriented");
		DispatchKeyValue(ent, "spawnflags", "1");
		DispatchKeyValue(ent, "scale", "0.1");
		DispatchKeyValue(ent, "rendermode", "1");
		DispatchKeyValue(ent, "rendercolor", "255 255 255");
		DispatchKeyValue(ent, "targetname", sprite_name);
		DispatchKeyValue(ent, "parentname", szTemp);
		DispatchSpawn(ent);
		
		TeleportEntity(ent, vOrigin, NULL_VECTOR, NULL_VECTOR);

		g_EntList[iClient] = ent;

		SetVariantString(szTemp);
		AcceptEntityInput(ent, "SetParent", iClient, ent);
	}
}
__________________
Plugins:
[Any] Aim Menu

Want a TF2 plugin? Feel free to pm me to discuss it.
Skippy is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 11-20-2014 , 04:24   Re: TF2 Sprite
Reply With Quote #18

Try moving teleportentity before you set the parentname

That might not be it though...
__________________

Last edited by Chdata; 11-20-2014 at 04:24.
Chdata is offline
Oshizu
Veteran Member
Join Date: Nov 2012
Location: Warsaw
Old 11-20-2014 , 08:01   Re: TF2 Sprite
Reply With Quote #19

Try perhaps using two sprites instead one
1st attached to player
2nd attached to sprite that was attached to player before?
__________________
...
Oshizu is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 11-21-2014 , 03:16   Re: TF2 Sprite
Reply With Quote #20

Let's not try to attach stuff to players when it's actively being disabled by design.

Use a different method. Entities such as env_spritetrail, info_particle_system will display properly when attached to players.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram 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 20:16.


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