change hotspot[x].name

Started by miguel, Mon 26/12/2011 14:41:48

Previous topic - Next topic

miguel

Hi guys,
Is there a workaround for changing hotspot names during script? Without replacing them with objects?
I've checked the forums but it was inconclusive and the manual does say it isn't possible...

Thanks


I guess I can duplicate hotspots with the name I want and just enable them on and off...
Working on a RON game!!!!!

Khris

You can't duplicate them because two hotspots can't occupy the same pixels.

The only workaround is to replace @OVERHOTSPOT@ depending on a variable.

Code: ags
  // rep_ex

  lblOH.Text = "@OVERHOTSPOT@";
  var hid;
  if (GetLocationType(mouse.x, mouse.y) == eLocationHotspot) {
    Hotspot*h = Hotspot.GetAtScreen(mouse.x, mouse.y);
    hid == h.ID;
    if (player.Room == 3) {
      if (hid == 4 && carpet_is_wet) lblOH.Text = "wet carpet";
    }
    ...
  }

miguel

Okay, I understand what you're saying. Should be easy to do it.

Thanks Khris, merry xmas.
Working on a RON game!!!!!

SMF spam blocked by CleanTalk