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 - Stapper

#1
Hi all,


I made a mini-game involving a slider that needs to be held at a certain value to complete it. It works great but currently you can exploit this by simply setting the cursor to the correct value and waiting it out.

Is it possible to prevent the player from setting the cursor? Or better yet, can I somehow tie the movement of the slider to the movement of the mouse (like moving the mouse up will move the slider at the same time)?


I hope that describes my problem clear enough...
#2
Hi all,

We are looking to create some iconic items that players will remember fondly. As reference we are looking to the very best of the classic adventure games to see if they have any iconic items to see what they have in common. Now, we're having some trouble finding the iconic items that makes it instantly clear to which game it refers to. If you happen to be a big fan of one of the games below and an item or object from that game instantly comes to mind, would you be so kind as to leave this in reply?

Examples are the "rubber chicken with a pulley in the middle" for the Monkey Island series, or "hamster in a sweater" for Day of the Tentacle.

The games we have trouble with identifying an iconic item or object:
- Full Throttle
- Grim Fandango (Manny's Scythe maybe, but not that iconic?)
- Space Quest (Maybe broom or plunger?)
- King's Quest VI
- Indiana Jones and the Fate of Atlantis
- Sam & Max Hit the Road
- Blade Runner
- Gabriel Knight: Sins of the Fathers

Thanks so much in advance!
#3
Hi all,

I've coded a general pop-up when picking up an item so that the player gets feedback it is added to their inventory using the Tween module. However it halts the entire script which is very inconvenient. I've tried with WaitSeconds and the Tween StartDelay, but neither of these continue the script. If I remove the eNoBlockTween it doesn't wait at all to show the item and just eases in and out immediately.

Does anyone know a way to still show the item for 3 seconds before easing out the pop-up without halting the game?

Code: ags
function InvPopAdd(int item)
{
  gInvPopup.SetPosition(-79, 569);
  gInvPopup.Visible = true;
  btnInvPop.NormalGraphic = item;
  gInvPopup.TweenX(0.3, 0, eEaseOutSineTween);
  //WaitSeconds(3.0); //has same result as below
  gInvPopup.TweenY(0.6, 768, eEaseOutSineTween, eNoBlockTween, 3.0);
  gInvPopup.Visible = false;  
}
#4
I've been scouring the forums and manual for days now and trying modules to find an answer, but I simply cannot find what I'm looking for.

Sure I can get a nice background for a dialog or make a custom GUI for it, but the placement doesn't work the same. The say command placement is really nice as it automatically centers the text above the characters' heads and adjusts when they are close to a screen border. I can't seem to get the same effect with a dialog box or GUI as these have to be manually placed.

Is there any way so I can get a background behind the say command? Or failing that is there a way so that the build in text GUI feature can be placed the same way the say functionality works?
#5
I've been using the single click cursor script from hedgefield (link) which works very nicely.
I would like to add the feature of closing the inventory automatically upon selecting an item. I know I have to use "gInventory.Visible = false;" but I have no idea where to place it. I've tried certain lines but none of them worked. Is it possible to do this within this script?

Here is the script for reference:
Code: ags
//MOUSE CLICKS
function on_mouse_click(MouseButton button) {
  //Walk/Talk/Interact:
  if ((button == eMouseLeft && SC_SwapLeftRight == false) || (button == eMouseRight && SC_SwapLeftRight == true)) {
    if ((GetLocationType(mouse.x, mouse.y) == eLocationHotspot) || (GetLocationType(mouse.x, mouse.y) == eLocationObject)) {
      if (mouse.Mode == eModeUseinv) ProcessClick(mouse.x,mouse.y, mouse.Mode);
      else ProcessClick(mouse.x, mouse.y, eModeInteract);
    }
    else if (GetLocationType(mouse.x, mouse.y) == eLocationCharacter) {
      if (mouse.Mode == eModeUseinv) ProcessClick(mouse.x, mouse.y, mouse.Mode);
      else ProcessClick(mouse.x, mouse.y, eModeTalkto);
    }
    else ProcessClick(mouse.x, mouse.y, eModeWalkto);
  }
  //LookAt:
  else if ((button == eMouseRight && SC_SwapLeftRight == false) || (button == eMouseLeft && SC_SwapLeftRight == true)) {
    if (mouse.Mode == eModeUseinv) {
      player.ActiveInventory = null;
      mouse.Mode = eModePointer;
    }
    else if ((GetLocationType(mouse.x, mouse.y) == eLocationHotspot) || (GetLocationType(mouse.x, mouse.y) == eLocationCharacter) || (GetLocationType(mouse.x, mouse.y) == eLocationObject)) {
      ProcessClick(mouse.x, mouse.y, eModeLookat);
    }
  }
  //Inventory select/combine:
  if (SC_CustomInvClicks == true) {
    if ((button == eMouseLeftInv && SC_SwapLeftRight == false) || (button == eMouseRightInv && SC_SwapLeftRight == true)) {
      if (inventory[game.inv_activated].IsInteractionAvailable(eModeUseinv) == 1 && mouse.Mode == eModeUseinv) {
        inventory[game.inv_activated].RunInteraction(eModeUseinv);
      }
      else if (inventory[game.inv_activated].IsInteractionAvailable(eModeInteract) == 1) inventory[game.inv_activated].RunInteraction(eModeInteract);
      else player.ActiveInventory = inventory[game.inv_activated];
    }
  }
}


//INVENTORY CLICKS
function on_event(EventType event, int data) {
  GUI *theGUI = gInventory1.OwningGUI;
  if (SC_CustomInvClicks == true) {
    //deselect current inventory item:
    if (event == eEventGUIMouseDown && player.ActiveInventory != null && data == theGUI.ID) {
      if ((mouse.IsButtonDown(eMouseRight) && SC_SwapLeftRight == false) || (mouse.IsButtonDown(eMouseLeft) && SC_SwapLeftRight == true)) {
        GUIControl *theControl = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
        if (theControl==gInventory1) {
          player.ActiveInventory = null;
        }
      }
    }
    //look at inventory item:
    else if (event == eEventGUIMouseDown && player.ActiveInventory == null && data == theGUI.ID) {
      if ((mouse.IsButtonDown(eMouseRight) && SC_SwapLeftRight == false) || (mouse.IsButtonDown(eMouseLeft) && SC_SwapLeftRight == true)) {
        GUIControl *theControl = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
        if (theControl==gInventory1) {
          InventoryItem *i = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
          if (i != null) i.RunInteraction(eModeLookat);
        }
      }
    }
  }
}
SMF spam blocked by CleanTalk