Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - AhPapapishu

#1
That's correct, thanks again :)
#2
Thanks a lot!I may try what you sugest, although using the room_RepExec function worked just fine!! :D
#3
Hi there!
See, I tried making this Lucasart-style status bar (a GUI with a label, lAction), that shows the action you can do with every object or hotspot in the room. The thing is, I also want , with certain objects, characters or hotspots, the status bar to display a different text (for example, if the mouse is in Interact mode on a door, instead of the usual "Use Door" there would be a "Open Door")

So, I writed this on the global script:

Code: ags

function repeatedly_execute() 
{
  GetGlobalInt(1);

 if (GetLocationType(mouse.x,mouse.y) == eLocationNothing) {
SetGlobalInt(1, 0);
  lAction.Visible=false;}
  else {lAction.Visible=true;
  if (Mouse.Mode==eModeWalkto){lAction.Text = "Go to";}
  if (Mouse.Mode==eModeLookat) {lAction.Text = "Look at";}
  if (Mouse.Mode==eModeTalkto){lAction.Text= "Talk with";}
  if (Mouse.Mode==eModePickup){lAction.Text="Pick";}
  if(Mouse.Mode==eModeInteract){if(GetGlobalInt(1)==0){lAction.Text="Use";}else if (GetGlobalInt(1)==1){lAction.Text=Game.GlobalStrings[1];}}
  }


I made it work with hotspots, using the "Hotspot_Mousemove" function... but the problem comes with Objects and Characters. I tried using this code in one Room with an object:

Code: ags

function repeatedly_execute()

{if (Object.GetAtScreenXY(mouse.x,mouse.y) == oescultura){SetGlobalInt(1, 1);Game.GlobalStrings[1]="Mess with";}}


But it doesn't work, the Status Bar displays "Use" instead of "Mess with". What did I do wrong? Any solution or alternative? Thanks in advance, folks!
SMF spam blocked by CleanTalk