Thread: [Solved] help with glow
View Single Post
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-24-2020 , 14:20   Re: help with glow
Reply With Quote #2

L4D1

Give target name to your dynamic prop (button world model)
DispatchKeyValue -> "targetname", "mybutton"

In func button, set Glow Entity (that mybutton)
DispatchKeyValue -> "glow", "mybutton"


You have two way to do this.

- Turn Off dynamic prop:
Add output command into func button
Code:
		"OnIn" "mybutton,TurnOff,,0,-1"
		"OnOut" "mybutton,TurnOn,,0,-1"
Yes, it silly, to hide model.

Or

- Use HookEntityOutput, listen one of func_button outputs
Code:
  output: OnDamaged
  output: OnPressed
  output: OnUseLocked
  output: OnIn
  output: OnOut
  output: OnUser1
  output: OnUser2
  output: OnUser3
  output: OnUser4
  output: OnKilled
Get func button entity index and look propertie: m_glowEntity
Code:
int glowentity = GetEntProp(func_button, Prop_Send, "m_glowEntity");
By default, when no entity have set to glow, it's -1
But when glow entity has set, you get unique entity index. It's not entity index or entity reference.
I'm not sure what kind/type number it is.

Now you make code when button is pressed and so on.
PHP Code:
// Remove glow entity from func_button
SetEntProp(func_buttonProp_Send"m_glowEntity", -1); 

*ps:
I quickly tried this L4D in-game with addons. I have not tested through Dedicated Server.
And this could also glow dynamic prop through walls, when someone is aiming to func_button. Hard to test alone.
Also, I made those entities with Hammer map editor, not by plugin...
__________________
Do not Private Message @me

Last edited by Bacardi; 10-24-2020 at 15:02.
Bacardi is offline