[Request] function onChat(msgParam, timer, color, hide, ...) end
function onChat(msgParam, timer, color, hide, ...) parameter = { msgParam = "Chat input", timer = "Set display duration of message", color = "Set chat color in the chat log, if not hidden", hide = "Hide chat in the chat log", ... = "vararg exp; Insert more parameters here"--, } end
Yeah ukr: I request another function that for my perspective is quite essential for creating greater Lua script in Hedgewars. Imagine a gameplay system using chat only, or the more compact one. It'll be a hella lot easier to do specific things IMHO. There's should be an infinity possibility next up if devs would implement such function.
(e.g: Cheat-Codes, Debugging, Developer's Only-Code, etc)
Now imagine blocking such words from gameplay with this function
(e.g: Penisula, Uranus, Vegane, Duck, Beach, Sitting, Crop, Fork, use That Hoe Over There, Porthub, Six, and the other 100s most used English word *derpface*)
*Insert more potential usefulness of this function here*
(e.g: *Insert examples here*)
PS: Of course it's not a mandatory to name this function as "onChat", its just a design suggestion, not a police, and this is repeated over and over ikr.
Thank you for your time, have a nice day/night ^^
╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜
I can't really think of an compelling use case for onChat.
The use case “custom chat commands” would be better implemented properly in the engine rather than scripts. If we do this at all.
For debugging, we have the /lua command.
Hi, I am a Hedgewars developer.
This function is the soul mate for WriteLnToChat function
They should be married and be a legit couple and have some kids (e.g: /pm *player* *message* ; etc)
You wouldn't let them all alone in this cruel world, right?
So... I believe in devs with my entire trust, that they can do this easily and entirely
*giggle* ^^
╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜