Anonymous user
Scripting, Code & Interaction: Difference between revisions
Jump to navigation
Jump to search
→Changing the names of characters, hotspots, objects, and inventory items in the middle of gameplay: added 2.71 things
*>SSH (→Slowing down your loops: float note) |
*>SSH |
||
Line 256: | Line 256: | ||
StrCopy(character[WORKER].name, "Crewman Johnson"); | StrCopy(character[WORKER].name, "Crewman Johnson"); | ||
in AGS 2.71 or later, you CAN use '''=''', so: | |||
cWorker.Name="Crewman Johnson"; | |||
For inventory names, just use the '''SetInvItemName()''' (or '''iCup.SetName()''' for AGS V2.7 and above) function like so: | For inventory names, just use the '''SetInvItemName()''' (or '''iCup.SetName()''' for AGS V2.7 and above) function like so: | ||
Line 261: | Line 265: | ||
SetInvItemName(4, "cup of tea"); | SetInvItemName(4, "cup of tea"); | ||
OR, if you're using V2.7 | OR, if you're using V2.7: | ||
iCup.SetName("cup of tea"); | iCup.SetName("cup of tea"); | ||
OR in 2.71+: | |||
iCup.Name="cup of tea"; | |||
As for hotspots and objects, it isn't currently possible to change their names during gameplay. That may change in future versions, however. | As for hotspots and objects, it isn't currently possible to change their names during gameplay. That may change in future versions, however. |