I would like to see more name functions added to the game like the ones available for the names of inventory items. Functions I would like added:
GetHotspotName(int hsnum, string buffer);
store the name of hotspot number hsnum in buffer
GetObjectName (int obj, string buffer);
store the name of object number obj in buffer
GetCharacterName (CHARID, string buffer);
store the name of the specified character in buffer using either the characters number or script name
SetHotspotName(int hsnum, string name);
sets the name of hotspot number hsnum to name
SetObjectName (int obj, string name);
sets the name of object number obj to name
SetCharacterName (CHARID, string name);
sets the name of the specified character to name using either the characters number or script name
or just use
GetLocationName (int x, int y, string buffer)
Also, if you use GetLocationType(int x, int y), you can detect if the mouse is over an hotspot, a character or an object. If you use it combined with GetLocationName, you pretty much get the result you want:
if (GetLocationType(mouse.x,mouse.y) == 1) {GetLocationName(mouse.x,mouse.y, hotspotname);}
if (GetLocationType(mouse.x,mouse.y) == 2) {GetLocationName(mouse.x,mouse.y, charactername);}
if (GetLocationType(mouse.x,mouse.y) == 3) {GetLocationName(mouse.x,mouse.y, objectname);}
Get/SetObjectName is already on my to-do list.
Get/SetHotspotName would be a possibility.
Get/SetCharacterName is unnecessary, since the variable characters[CHARID].name is available instead
ah yes, SetHotspot/ObjectName would be useful.
Quote from: Pumaman on Mon 23/08/2004 20:46:37
Get/SetObjectName is already on my to-do list.
Get/SetHotspotName would be a possibility.
Get/SetCharacterName is unnecessary, since the variable characters[CHARID].name is available instead
what about hotspot[num].name and object[num].name? Would using those in code work?
no
but you could just use GetLocationName (x, y, buffer)
(the hotspotlocation will never move)
Well, the main reason I'm curious about getting the names of objects and hot spots and the like is because I am hoping to make a text parser game.