Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: dayowlron on Mon 15/01/2018 01:09:12

Title: Object.Name is blank
Post by: dayowlron on Mon 15/01/2018 01:09:12
I am having trouble with something. I need to get the object name but it is returning an empty string.
Just including code related to the problem.

  LocationType l;
  Object *o;
  o=Object.GetAtScreenXY(mouse.x, mouse.y);
  l=GetLocationType(mouse.x, mouse.y);
  if (l==eLocationObject) {
    return String.Format("%d %s",o.ID, o.Name);
  }

The object name field is filled in. It is called "oDoor". However my function is returning "1 ".
Title: Re: Object.Name is blank
Post by: Crimson Wizard on Mon 15/01/2018 01:10:58
Object.Name is not the script name, it is the property called "Description" the the Editor, which is rather used as hotspot's description for player.
Title: Re: Object.Name is blank
Post by: dayowlron on Mon 15/01/2018 01:15:31
Thanks, just figured that out.