Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: mkennedy on Thu 05/10/2006 22:09:20

Title: Is there a way to get the names of the cursors?
Post by: mkennedy on Thu 05/10/2006 22:09:20
Is there a way to get the names of the cursors and feed them into an array of strings? For example curs[1] would contain the name of cursor 1 and so on.
Title: Re: Is there a way to get the names of the cursors?
Post by: SSH on Thu 05/10/2006 22:17:24
No
Title: Re: Is there a way to get the names of the cursors?
Post by: Sadistyk on Fri 06/10/2006 05:03:33
Well, I don't know if this is what you want, but you can do this:
declare a String in the header:
String name;

Then, in the repeadtely execute part you put something like this:
function repeatedly_execute() {
  // put anything you want to happen every game cycle here
  if (mouse.Mode = eModeInteract) {
    name = "Interact";
  }
  if (mouse.Mode == eModeLookat) {
    name = "Look at";
  }
  if (mouse.Mode == eModePickup) {
    name = "Pick up";
  }
  if (mouse.Mode == eModeTalkto) {
    name = "Talk to";
  }
  if (mouse.Mode == eModeWalkto) {
    name = "Walkt to";
  }
}

If you want to use the names in a GUI, something like a label you just do:
label.Text = name;
Title: Re: Is there a way to get the names of the cursors?
Post by: Pumaman on Sat 07/10/2006 11:34:37
It's reasonable suggestion though, would anyone else find it useful?
Title: Re: Is there a way to get the names of the cursors?
Post by: monkey0506 on Sat 07/10/2006 11:44:14
YES!!! Also a way to check how many there are. Thanks! :=
Title: Re: Is there a way to get the names of the cursors?
Post by: strazer on Thu 14/12/2006 12:08:45
Tracker'd: http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=591