That should do, thanks
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 MenuQuote from: Mr. Matti on Tue 28/09/2010 19:03:07
You have to select the actual inventory area (marked by white borders), not the whole GUI.
Quote from: Mr. Matti on Tue 28/09/2010 17:35:51
If you click the inventory the item width and height variables are right at the top of the panel to the right.
Quote from: Khris on Tue 28/09/2010 17:13:16
1. I answered this in your other thread; you'll have to change the ItemWidth and ItemHeight setting in your InventoryWindow.
The thing is, if those are way smaller than the sprites you're using, the items should all overlap and be hard to click on anyway, not sure why that doesn't bother you or if it means something else is wrong.
On the other hand, AGS might use the sprite dimensions to place the items but only react to clicks in the top left corner then.
2. Change the setting back, then use player.Say("Blah"); when you want text over the character's head and Display("Blah"); when you want the box.
Quote from: Khris on Tue 28/09/2010 13:51:00
Check the ItemWidth and ItemHeight settings of your InventoryWindow. You're probably using graphics way bigger than the entered values.
Quote from: Khris on Mon 27/09/2010 17:00:24Quote from: dahui58 on Mon 27/09/2010 13:07:13
How do I actually set that so when you click an inventory item it becomes the active inventory?
This is the default behavior. In the default inventory GUI, click the arrow button, then the item.
If you're using another inventory GUI, you don't have to add code for every item. Just activate that inventory clicks are handled in script in the General settings pane, then add eButtonLeftinv behavior to on_mouse_click in Global.asc:Code: ags else if (button == eMouseLeftinv) { InventoryItem*ii = inventory[game.inv_activated]; // get item that was clicked on if (mouse.Mode == eModeUseinv) ii.RunInteraction(eModeUseinv); // use item on item else player.ActiveInventory = ii; // set item active }
Quote from: Mr. Matti on Mon 27/09/2010 12:54:42
The ActiveInventory is whichever item you've selected.
Quote from: Mr. Matti on Mon 27/09/2010 12:54:42
You get a parse error because it should look like this:Code: ags function iWire_Interact() { if (player.ActiveInventory == iWire){ // post your code here } }
The ActiveInventory is whichever item you've selected.
Quote from: Khris on Mon 27/09/2010 10:39:35
Assuming the machine is a hotspot, the interaction event is "Use inventory on hotspot".
Inside the function, use if (player.ActiveInventory == iWire) or similar.
If the player is supposed to be able to remove it again, you need a wire object for every machine or outlet (or one per room).
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.115 seconds with 14 queries.