Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

event Creature:onSay(text, type) #3536

Open
Zbizu opened this issue Aug 3, 2021 · 0 comments
Open

event Creature:onSay(text, type) #3536

Zbizu opened this issue Aug 3, 2021 · 0 comments
Labels
feature New feature or functionality

Comments

@Zbizu
Copy link
Contributor

Zbizu commented Aug 3, 2021

Explanation of what you want to do that is currently impossible

changing the output text based on input this way:
return text, type

if onSay is misleading, we can name it onSpeak

Desired functionality

replace text and talktype of spoken message

return text, type to send the message
return false to cancel it

Available workarounds

none for players
if statements for npcs
rewriting yell system to lua (creaturescript onThink) for monsters

note: since other creatures have other ways to deal with it, we can make it players only to save performance

Prior art

example code that could be written with such function:

function Creature:onSay(text, type)
	if self:isPlayer() and self:getStorageValue(someStorage) == 1 then
		type = TALKTYPE_MONSTER_SAY
	end
	
	return text, type
end
@EPuncker EPuncker added the feature New feature or functionality label Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or functionality
Projects
None yet
Development

No branches or pull requests

2 participants