- Joined
- Jul 7, 2007
- Messages
- 4,049
- Reaction score
- 238
Okay, so everyone that has changed over to 9.1 has certainly noticed that the beloved doSendAnimatedText has dissapeared
However, the doPlayerSendTextMessage has gained 3 extra parameters that allows us to send animated text, so I thought of trying to replicate the old function, but it has 2 problems that I can't seem to fix:
1) I can't seem to send text, it is most likely a client limitation(afaik, please prove me wrong), which makes it impossible to send
2) This wasn't expected to be used simply for the animated text, so a message must always be sent, I have set the message to "", but on the game's console it'll still show an empty line, if it is possible to fix and someone knows how, please do post here
I did this function mostly for newbies that still don't know how to use the new params, other coders might not use it because having it print the empty line is lame(I think it is)
Like I said, its here incase anyone wants it
EDIT:
Changed the code for Dalkon version, it's a lil better then mine
However, the doPlayerSendTextMessage has gained 3 extra parameters that allows us to send animated text, so I thought of trying to replicate the old function, but it has 2 problems that I can't seem to fix:
1) I can't seem to send text, it is most likely a client limitation(afaik, please prove me wrong), which makes it impossible to send
2) This wasn't expected to be used simply for the animated text, so a message must always be sent, I have set the message to "", but on the game's console it'll still show an empty line, if it is possible to fix and someone knows how, please do post here
Code:
function doSendAnimatedText(pos, value, color, player)
if(not tonumber(value))then
return error("arg #2 in doSendAnimatedText is not a number")
end
if(isPlayer(player))then
doPlayerSendTextMessage(player, MESSAGE_EXPERIENCE, "", value, color, pos)
else
for _, v in ipairs(getSpectators(pos, 7, 5, true)) do
if(isPlayer(v))then
doPlayerSendTextMessage(v, MESSAGE_EXPERIENCE, "", value, color, pos)
end
end
end
end
I did this function mostly for newbies that still don't know how to use the new params, other coders might not use it because having it print the empty line is lame(I think it is)
Like I said, its here incase anyone wants it
EDIT:
Changed the code for Dalkon version, it's a lil better then mine
Last edited: