iTicTactical 10 Posted September 16, 2020 Hey all, In my scenario player_1 and player_2 have an opportunity to kill sentry_1. To be dynamic, I want to code in a radio response from the player who killed him. Something simple like "Dropped him." for example. I know how to code the speech, what I don't know is how to identify which player killed sentry_1. I've looked at if and or but I can't figure out how to compile it into a working script. Any guidance is appreciated. Cheers! Share this post Link to post Share on other sites
froggyluv 2136 Posted September 16, 2020 So what you need is a "killed" eventhandler from the Wiki: this addEventHandler ["Killed", { params ["_unit", "_killer", "_instigator", "_useEffects"]; }]; So you would add something like that to the target or sentry_1. Select 1 would be the Killer. 2 Share this post Link to post Share on other sites
iTicTactical 10 Posted September 16, 2020 4 hours ago, froggyluv said: So what you need is a "killed" eventhandler from the Wiki: this addEventHandler ["Killed", { params ["_unit", "_killer", "_instigator", "_useEffects"]; }]; So you would add something like that to the target or sentry_1. Select 1 would be the Killer. Thanks for the reply. It looks like I've got the eventHandler to work simply from using this addEventHandler ["killed", "hint format ['Killed by %1',_this select 1]"]; but I want to swap the response from a hint to something like a groupChat format. Assuming that you can alter that particular code, changing hint format to groupChat doesn't work. If not, what would the code look like if I had to use a separate script? I've tried _instigator groupChat "Dropped him."; but that doesn't want to work either. Share this post Link to post Share on other sites
RCA3 593 Posted September 17, 2020 You are missing the params? this addEventHandler ["killed", { params ["_unit", "_killer", "_instigator", "_useEffects"]; _instigator groupChat "Dropped him." }]; 1 Share this post Link to post Share on other sites