- Oct 14, 2011
- 72
- 4
I want to listen for event when player is killed by other player.
I started my journey from this topic and official wiki page of trigger_brush.
So I tried with trigger_brush (there is example in wiki; link above) and with func_button 1 / func_button 2 ways.
In both cases player stuck on spawn (it looks like player is spawning inside solid block). But it doesnt matter if player is spawning inside that brush/button or outside. In every case player will stuck. Even if that brush/button is outside map.
There is also another way to listen that event. With logic_eventlistener.
I want to add it into tf.fgd, But I cant find source of it anywhere. Even in actual Portal 2 FGD...
Do you have any ideas why that trigger_brush doesnt work?
Do you have code (script? I dont know how to name it) for logic_eventlistener?
Edit: I think I found that logic_eventlistener
I started my journey from this topic and official wiki page of trigger_brush.
So I tried with trigger_brush (there is example in wiki; link above) and with func_button 1 / func_button 2 ways.
In both cases player stuck on spawn (it looks like player is spawning inside solid block). But it doesnt matter if player is spawning inside that brush/button or outside. In every case player will stuck. Even if that brush/button is outside map.
There is also another way to listen that event. With logic_eventlistener.
I want to add it into tf.fgd, But I cant find source of it anywhere. Even in actual Portal 2 FGD...
Code:
logic_eventlistener is a point entity available in all Source games since Portal 2.
Do you have any ideas why that trigger_brush doesnt work?
Do you have code (script? I dont know how to name it) for logic_eventlistener?
Edit: I think I found that logic_eventlistener
Code:
@PointClass base(Targetname) = logic_eventlistener :
"An entity that can listen to events fired from code and fire " +
"and output when it happens."
[
EventName(string) : "Event Name" : "" : "The name of the event that you want to listen for."
IsEnabled(choices) : "Start Enabled" : 1 =
[
0 : "No"
1 : "Yes"
]
TeamNum(choices) : "Team Number" : -1 : "If set, will only fire its output if the event is generated from someone of the specified team." =
[
-1 : "Don't care"
1 : "Team 1"
2 : "Team 2 (ORANGE)"
3 : "Team 3 (BLUE)"
]
// Inputs
input Enable(void) : "Enable the logic_measure_movement."
input Disable(void) : "Disable the logic_measure_movement."
// Outputs
output OnEventFired(void) : "Fired when the event has been detected."
]
Last edited: