Feature request for more name functions

Started by Kennedym, Mon 23/08/2004 00:27:03

Previous topic - Next topic

Kennedym

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






Mr Jake

or just use

GetLocationName (int x, int y, string buffer)


Bernie

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);}

Pumaman

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

Mr Jake

ah yes, SetHotspot/ObjectName would be useful.

Kennedym

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?

Mr Jake

no
but you could just use GetLocationName (x, y, buffer)

(the hotspotlocation will never move)

Kennedym

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.

SMF spam blocked by CleanTalk