Hmm that is odd then. I do the exact same thing in our mod for blood effects on the weapons that fade out after some time, and for some special effects on some of the players. At first I had done it with all the variables stored into the proxy and I got the exact situation you describe where all the entities of the type like weapon or viewmodel with the same material would all be affected by any one of the weapons getting into a blood state.
If you have logic such as if the time is beyond a certain point do not run any proxy logic that could be the cause because every time a material is rendered you need to ensure it is set for what setting that entity needs. Like if you had a blood effect on a weapon and then the next weapon did not need it you still need to reset the data back to no blood for that time. My basic logic thus is something like. OnBind() { If(entity.something) { //change the variables for the effect } EffectMaterialVar.SetValue(entity.varValue); } In this way every time the proxy is executed for a particular entity it is setting the changing material variables to what it needs regardless had it changed or not. Chris -----Original Message----- From: hlcoders-boun...@list.valvesoftware.com [mailto:hlcoders-boun...@list.valvesoftware.com] On Behalf Of Tom Edwards Sent: Thursday, May 06, 2010 5:57 AM To: Discussion of Half-Life Programming Subject: Re: [hlcoders] Getting material proxies to act on individual entities Ryan, that is exactly what I can't work out how to do. Chris, the variable is the amount of time since the player or ragdoll spawned so it's already stored in each entity. Unless you mean setting material vars on the player, which isn't how I thought this worked at all. On 05/05/2010 10:41, Ryan Sheffer wrote: > You mean every material of the same name is getting effected? That > seems very strange. Are you overriding the material in the entities > draw function? I remember replacing materials for the player for a > cloak effect with no problems. > > ~Ryan > > On May 5, 2010, at 2:01 PM, Tom Edwards<t_edwa...@btinternet.com> > wrote: > > >> I'm using a material proxy for my player spawn effect, which works >> fine >> except that it applies to all instances of the material in question at >> once. How should I go about applying the effect to different >> entities at >> different times? >> >> I expect that creating new instances of the material each time someone >> connects has something to do with it, but so far I've not even been >> able >> to access that area of the model... >> >> _______________________________________________ >> To unsubscribe, edit your list preferences, or view the list >> archives, please visit: >> http://list.valvesoftware.com/mailman/listinfo/hlcoders >> >> > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders