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

Topics - TD2345

#1
Reading through the forums, I've not been able to find a solution for a specific issue I'm having, apologies if I've overlooked anything.

Essentially at the moment, when I left click on an item in the inventory, it becomes the mouse cursor so it can be used on other items. The code for this is as part of the BASS template:

Code: ags
function on_mouse_click(MouseButton button)
{
  if (action != null)
  {
    action.Text = "";
  }

  if (!IsGamePaused() && (button == eMouseLeft || button == eMouseRight))
  {
    do_room_action(button);
  }
  else if (button == eMouseLeftInv || button == eMouseRightInv)
  {
    do_inventory_action(button, inventory[game.inv_activated]);
  }
}

If I replace the else if so it's like so:

Code: ags
else if (button == eMouseLeftInv || button == eMouseRightInv)
  {
     inventory[game.inv_activated].RunInteraction(eModeInteract);
  }

Then that changes it so that whatever event is set to interact for all inventory item runs (and conversely I can no longer have the mouse cursor become the inventory item).

The basic concept is that I have a book which the player can pick up, which the player can then left click on in the inventory bar and it opens up a new room with an object on the screen that functions as a book they can read.

The question I have, is there to set the book inventory item so it's the only inventory item that will run emodeinteract whilst all others will stick to automatically becoming the cursor?
#2
Hi,

So I've created a walk cycle for a player character who has a limp. As the character walks, the limping leg drags behind him.

The issue I'm having for the character movement is that the character should move forward with the first few frames in the cycle, then remain in position as the rest of cycle plays out and the limping leg catches up. As it is, the character keeps moving forward for the entire cycle, resulting an odd gliding look.

Is there a way to make it so the forward movement only occurs for the relevant frames and that they remain locked in position for the rest of the walk cycle?
#3
Hi,

I'm using AGS 3.6.0 (latest patch), BASS, and Double Click V 1.0 module.

I'm trying to figure out how to script an immediate (or at least as close as one can get) change room when I double click on either a hotspot or an edge.

Seen this done in a few modern games using the engine, but for the life of me unable to figure it out and not been able find any posts on how to programme it with my configuration.

Any help is tremendously appreciated.
SMF spam blocked by CleanTalk