Aller au contenu

Photo

Dynamically change the name of an area


  • Veuillez vous connecter pour répondre
8 réponses à ce sujet

#1
Claudius33

Claudius33
  • Members
  • 256 messages

Hi guys,

 

Would you know how to change by script the name of an area? For instance from 'Unknown' to its true name when the player has gathered enough information.

 

SetFirstName() doesn't seem to work for an area. I haven't found any other possible function so far.



#2
Tchos

Tchos
  • Members
  • 5 030 messages

I don't know any other function either, but have you tried leaving the area after changing the name, and re-entering?  Or changing it when not in the area and then entering it?



#3
Claudius33

Claudius33
  • Members
  • 256 messages

Thank Tchos.

 

I will try.

 

According to the notes, SetFirstName() doesn't work for areas.



#4
4760

4760
  • Members
  • 1 204 messages
If it's only for an area, you might make a copy, this time with the name, and use a trigger to switch the transition waypoints. It might not work for a city, or any other area where there's interaction with NPC, unless you spawn them all with all the attached variables (if any). But that's still worth trying if there's no way of changing the area name.
  • ColorsFade aime ceci

#5
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

If it's only for an area, you might make a copy, this time with the name, and use a trigger to switch the transition waypoints. It might not work for a city, or any other area where there's interaction with NPC, unless you spawn them all with all the attached variables (if any). But that's still worth trying if there's no way of changing the area name.

 

That's the only way I can see to do it. Kind of a pain, but... 



#6
Claudius33

Claudius33
  • Members
  • 256 messages

Sure I can copy the area (in that case it's easy because the player finds a locked gate if he comes too early), or just count on the player's distraction :rolleyes:.

 

Never mind. Not worth the value to continue searching. Thanks you all.



#7
rjshae

rjshae
  • Members
  • 4 478 messages

Perhaps the XML files that show the area can be customized to change the name shown? Lance Botelle might know how to do something like that.



#8
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

Hi,

If you mean the name as it is displayed in the "Area Map", then at a quick glance, it should be possible. You would need to rewrite this part (in the areamap.xml) by the looks of it:-

<UIText name="AREA_NAME_TEXT" x=20 y=36 width="398" height=23 align=left valign=middle fontfamily="Body_Font" style="1" uppercase=false multiline=false update=true OnUpdate=UIText_OnUpdate_DisplayAreaName() />

You would probably have to disable this section and then write your own callback to display the name text (whatever you decide it to be) as a text sent to the GUI. i.e. A script that sends the "name" of your area to XML each time it changes.

Cheers,
Lance.


  • rjshae aime ceci

#9
Claudius33

Claudius33
  • Members
  • 256 messages

Thank you Lance.

 

I haven't tried to fiddle with the UI XML so far. To be honest I'm not sure I will try. Thanks anyway.

 

I may choose the lazy way and also avoid to duplicate a large area or put a new intermediate area. So just praise the player sense of observation if he solves the riddle on his first try  :D.