• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Update creature info to the spectators?

Joined
Jul 30, 2008
Messages
80
Reaction score
30
Hello, this is my first topic (I know that I'm from 2008, it's because I mostly only read posts haha)
Well, I've done a simple function that change the creature name in-game to tfs 1.0, but I did it in the easy way, that is: create the monster in a far away position, update it's name then send them to the right place, and the players only see the creature with the changed name. But, what I want to do is, really "update" the name of the creature, without needing to send them far away. I need to update the creature to it's current spectators (which I can easily get tho), I just don't know how to change that to players who already "know" the creature. Maybe sending something to client? Idk.
If someone have an idea and want to share with me, it'd be great! :D
Thanks (I hope this topic is following the rules or something like that)
 
The name has to be changed before the creature is created or while off-screen of the player.
If you want to add a new feature of "updating names on screen" you will have to use the OTClient and make a new protocol.

Another option would be removing the creature from all clients, changing the name, then adding it back.

There is no "good option" unless you use OTClient.
 
The name has to be changed before the creature is created or while off-screen of the player.
If you want to add a new feature of "updating names on screen" you will have to use the OTClient and make a new protocol.

Another option would be removing the creature from all clients, changing the name, then adding it back.

There is no "good option" unless you use OTClient.
Yeah, I'm trying to remove from the clients then adding back, but I just can't figure out how :D
About OTClient, I will use later, I think.
 
Not hard really, there is addCreature and removeCreature in protocolgame.cpp that just removes it from the client.
I'm still trying to do that, without success :(
Can you help me with this code?
________
Edit:
Nvm, I finished the code
Now it's working properly, updating the creature to it's spectators, without sending them far away.
Thanks anyway.
 
Last edited:

Similar threads

Replies
3
Views
396
Back
Top