Currently through a conversation we have the option to change the name of a placeable you are conversing with. We find that the name changes after we shut down the server, is there any way to make it last over server shut downs? Also have the same question about a horse NPC over resets. Aswell as a way to get around it changing the name of itself after being ridden, when it goes to "Charactername's Horse"
Permanent Placeable Name Changes.
Débuté par
Kingdom_Of_Hearts
, sept. 15 2012 09:07
#1
Posté 15 septembre 2012 - 09:07
#2
Posté 15 septembre 2012 - 11:09
If the placeable is spawned by script, you could make the name persistent.
The trick is to store the name in a database, and associate it with the placeable. In the same script that spawns the placeable, you would look up the name for the placeable in the database and then set the placeable's name after it is created.
Also, when the PC is changing the name for the placeable in your conversation, update the name in your database.
--
I did a similar thing with NESS for my module. You can specify spawn scripts when you use NESS, and so I was using those on placeables to change their name immediately after spawn. This is necessary because placeables do not have a built in OnSpawn event like creatures do.
The trick is to store the name in a database, and associate it with the placeable. In the same script that spawns the placeable, you would look up the name for the placeable in the database and then set the placeable's name after it is created.
Also, when the PC is changing the name for the placeable in your conversation, update the name in your database.
--
I did a similar thing with NESS for my module. You can specify spawn scripts when you use NESS, and so I was using those on placeables to change their name immediately after spawn. This is necessary because placeables do not have a built in OnSpawn event like creatures do.
#3
Posté 15 septembre 2012 - 11:48
They aren't spawned by a script. They are put in the module before hand. They are signs to player ownable homes. I'm not sure how to script the name storing in a database or any of that, if somebody could assist me, that would be fantastic.
#4
Posté 15 septembre 2012 - 11:56
You do not really need a OnSpawn script. You can use the HB script on the instance of the object to:
1) create a new instance of the object at the same location. ( basicly the same object without the HB )
2) Change the name of the new instance to the name stored in the DB.
3) Destroy Self. ( The instance with the HB)
EDIT: There is a thread in here some that covers just about the topic. Let me see if I can find it.
I just bumped it. Persistant placeables
1) create a new instance of the object at the same location. ( basicly the same object without the HB )
2) Change the name of the new instance to the name stored in the DB.
3) Destroy Self. ( The instance with the HB)
EDIT: There is a thread in here some that covers just about the topic. Let me see if I can find it.
I just bumped it. Persistant placeables
Modifié par Lightfoot8, 16 septembre 2012 - 12:08 .
#5
Posté 16 septembre 2012 - 12:39
Thanks!





Retour en haut






