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 - Rex Mundane

#81
So the idea is that I want a bar at the bottom of the screen with the inventory in it that appears and disappears off the bottom of the screen whenever the mouse is on it, like in Broken Sword frinstance. What I've got is basically a little script in the repeatedly_execute() function that reads as follows:
Code: ags
if (mouse.y > 549) {
    if (gInv.Y > 549) {
      gInv.Visible = true;
      gInv.Y-=5;
    } else {
      gInv.Y = 549;
    }
  } else {
    if (gInv.Y < 599) { 
      gInv.Y+=5;
    } else {
      gInv.Y = 599;
      gInv.Visible = false;
    }
  }


(For clarification, the game is in 800x600 resolution)

Now this works fine, but seems... I dunno, unnecessarily absurd to me? Is Inelegant the word I'm looking for? Anyway it seems to me (and bear in mind I am an imbecile) that there just has to be a better way than this to accomplish something as simple as this, and I just wanted to ask, is there?
#82
Trying to use the BASS module I ran into a problem with scrolling rooms, where I couldnt walk further to the right than the screenwidth coordinate. Ended up replacing "player.Walk(mouse.x, mouse.y, eNoBlock, eWalkableAreas);" with "ProcessClick(mouse.x,mouse.y,eModeWalkto);" and that fixed it. Just thought you should now if you wanted to update the module.
#83
Hi, I'm new to this and keen to learn, and I'm sure there's an easy answer to this that I just don't know yet, so apologies if its painfully obvious.

How should I code it such that interacting with a hotspot or talking to an NPC moves the player character to the WalkToPoint, but keeping the mouse active such that, say, I change my mind mid-stroll and want to walk somewhere else or open the inventory or something, I can still do that.

I tried: "cEgo.Walk(200, 300, eBlock, eWalkableAreas);" in the room event code, duplicating the effect of just setting the WalkToPoint, which turns the mouse into the wait cursor, so I tried changing it to 'eNoBlock', but then ego isnt walking long enough to even turn around before the rest of the script executes.

Ideally, clicking interact anywhere in the hotspot will produce the effect of clicking the WalkTo cursor on (200, 300), then, when reaching it, executing the remainder of the script, and I can't tell if this is a really simple thing to change or a really complicated one.
SMF spam blocked by CleanTalk