![]() |
![]() ![]() ![]() ![]() ![]()
|
Author | Topic: Suffer my deathly hand of badstuff, and rocks, and Kraft cheese! |
Jakk |
![]() er... I am kind of wondering if there is a code to change the name of a object or room in a library or something. I dont need to learn how to do it, just the script. and no game tutorials, I just get confused and end up reading a stupid book |
passerby |
![]() Why do you want to change the name of the room? It seems that changing the actual string contents of a room's or object's name could cause problems, and i'm not sure it could (or should) be done. For objects it might suffice to have two objects with different names, but itherwise the same, and switch them as needed. I have tried to do something similar to what you want with changing the room name, by turning off the text to suppress the real room's output, moving the player to a new room (with no description) whose name and description then prints, and moving them back to the original room. Properly done, it looks like the room they are moving to has changed. |
MaDbRiT |
![]() Hi guys All you need to do is change the alias property of either an object or a room from code - that has the visual effect you seek with no nasty side effects. :-) As a matter of interest, (thanks to a very sensible limitation of Quest) you cannot change the actual name of a room or an object, that would be a nightmare because it would 'break' all your code relating to the room or object. Think about it, all exits address rooms by name, if you changed a name your exits that pointed to the room would now point to a non-existant room... objects would be in mysterious unreachable rooms... Aliases are provided for this purpose! Al |
Jakk |
![]() Thats what I mean! How do i change the aliases |
MaDbRiT |
![]() Changing an alias is just like changing any other property, you use: quote: Whenever you want to change a room or object's visible name (i.e. its alias) you arrange for the above line of script to be run, substituting the 'object or room name' & 'newname here' with appropriate values (or more probably variables). Al |
Jakk |
![]() thanks. |
Gautier UK |
![]() would this work when..... a player types "/create room north" then a clone of an empty room already created goes there, then when asked "Type Room Name", the next thing the player types goes into a string variable, then the alias changes? sorry if im confusing anybody, ask question if u want. lol |