TimOOn Posted September 18, 2014 Share Posted September 18, 2014 Hello, I was playing with et_Obituary function recently and I tried to replace obituary message with my own. It doesn't work the way I expected. If a string is returned from this function it does replace default obituary, but message is displayed on chat area instead of cpm (popup) like other obituaries. Is there a way to print custom obituaries on cpm area? I know I could use "et.trap_SendServerCommand" to do that but it won't overwrite the original message, so both of them will be printed. Quote Link to comment Share on other sites More sharing options...
Management gaoesa Posted September 18, 2014 Management Share Posted September 18, 2014 Behaviour depends on the g_logOptions flag 1.http://mygamingtalk.com/wiki/index.php/Silent_Mod_Server_Cvar#g_logOptions TimOOn and Kynval 2 Quote Link to comment Share on other sites More sharing options...
TimOOn Posted September 18, 2014 Author Share Posted September 18, 2014 oO Thanks for help. I never would have found this. I'm wondering why I even set this flag. Quote Link to comment Share on other sites More sharing options...
Kynval Posted September 19, 2014 Share Posted September 19, 2014 (edited) It is no problem to creat obituaries for killing myself...but how to add killer name if i'm killed by someone? like in ETPUB 0.9.1: set g_obit206 "[v]^7 was killed by [a]^7's knife." but in silent i want to do it by lua..can someone explain me? Edited September 19, 2014 by Kynval Quote Link to comment Share on other sites More sharing options...
Management gaoesa Posted September 19, 2014 Management Share Posted September 19, 2014 You implement et_Obituary callback http://mygamingtalk.com/wiki/index.php/Silent_Lua#et_Obituary. You can see the MOD values from G_Damage http://mygamingtalk.com/wiki/index.php/Silent_Lua#G_Damage. Quote Link to comment Share on other sites More sharing options...
Kynval Posted September 19, 2014 Share Posted September 19, 2014 (edited) But i'm not too good with lua's, so please make a one explain for me if victim == killer and meansOfDeath == 206 thencustomObit = "^7%s ^zwas killed by" ..killername.. "by knife." return string.format(customObit, et.gentity_get(victim, "pers.netname"))end ? And where can I find full list of Obituaries ? Edited September 19, 2014 by Kynval Quote Link to comment Share on other sites More sharing options...
Kynval Posted September 19, 2014 Share Posted September 19, 2014 Why don't you make it like in ETPub http://magics-territory.com/et/mods/readme/etpub_docs/obituaries.html ?? Quote Link to comment Share on other sites More sharing options...
Management gaoesa Posted September 19, 2014 Management Share Posted September 19, 2014 Just read the links I posted, it is very clear then. I agree that creating a Lua script is a bit more work. The reasons why we remove certain abilities that were in ETPub, has been to make the experience more consistent to players. Also, some features were pretty much experimental. Couple mistakes were made, but this is not one of those. If you are new to scripting, please read a Lua tutorial first. It will be easy then and Lua is very easy scripting language. Dragonji 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.