Discussion in 'Marketplace' started by Catan, Sep 20, 2016.
How to use the arrow keys to select the obj_inv_panel_backpack item
@oudin.chen , you should take a look at the implementation of the toolbar panel. That specific panel already has a key based selection mechanism that works with the numbers from 0 to 9, it shouldn't be to difficult to convert that to an arrow based one.
I am going to make a slot like a mouse slot, a bit like the 0-9 button, but it moves using the arrow keys
@Catan, I want 2 breads plus 3 radishes to synthesize a blood bag, can give an example of me?
I want 2 breads plus 3 radishes to synthesize a blood bag, can give an example of me?
You can change / define recipes in the craft_init script, by using ex_craft_add_recipe(key_of_resulting_item, number_of_resulting_items, ingredient_1, [ingredient_2], ...).
It's just a call like:
but i want code like this:
In this case you’ll need to change the crafting system so that it considers the quantities (as stacks) of the ingredients. Right now since crafting is not the main focus of the asset i tried to keep things simple.
This requires changing how recipes are stored, and therefore you’ll also need to adapt the recipe checking and the crafting panel accordingly. It’s not too difficult but requires some work, if you need some directions feel free to contact me by email
I can't find your email. My email : email@example.com . Can you send your email to this email?
Is there a way, or have I missed some magical change to the inventories, Backpack, hot bar, equipped items and crafting, all over to the GUI rather than an object in game? Having a problem now that my game is getting larger that if I move around in a room the inventories jump one pixel or one move behind where the camera is. Also I cant zoom in or out with Camera Properties without the inventory moving around the screen and changing size with it. I can kinda get around the Zoom where if we are zoomed in... close all the inventories. But if this CAN be in the GUI and I have missed how... would love to know. Thank you. Thank you for your time.
You can definitely draw everything to the gui layer, but since the user has to interact with the inventory, you still need to move the actual objects around to register the mouse clicks.
When using a gui resolution that is different than the game resolution (or things lile zoom and rotation) of course this can get difficult to handle and the inventory doesn’t adjust automatically (since I can’t know in advance how you handle your views).
It’s a known problem in general when using the gui layer, not just specific to exinv, that can be solved in different ways, but you’ll have to adapt the inventory object yourself.
Well I may just ignore the GUI side of it and close down all the windows when we zoom in and allow them to open again when we zoom out. How about the twitching it does when we move and the camera follows. I mean even with out doing anything fancy its as if its one step behind and needs to keep up... I could pause the game when we open items and we would never know but the hot bar down there still twitches and I was looking forward to using it. - Again thank you for your time.
Are you using the latest version? I move the panels in the end step event, which should be happening after the view has been moved, UNLESS of course you are moving the view yourself also in the end step (or draw).
A simple solution to this would be to draw the inventory on the gui layer, keeping the object position as it is now. Otherwise you have to ensure the that the follow view code (end step in obj_inv_panel) is run after you move your view.
Ok I did "fix" this problem just now- I may need to go back and tweak with it but I sat down with coffee and looked over everything. In the test room of my game I removed anything and everything to do with a camera or effects for it. STILL had the twitch when we moved. All I was using at this point was the View port 0s Object following from the properties for the room. BUT! I used three lines of code for the step even of the player to move the camera, allowing the end step of the obj_inv_panels to run last and all is right with the world- neat.
At this point I should be able to mess with it and tell it when to allow or not allow us to open the inventories.
I would love to know HOW to move this to the GUI, I'm not the best at coding. I don't know if you recall but I was on here last time asking help for how to check what item we had in what slot and based on a left or right mouse button we would attack or use an object. You told me that the info was in the documentation... I took a lot of time and looked it all over and I am happy to say I got it working and now even have a layer system in the draw event for our player to add clothing and armors based on what is in what slot also. Pretty happy about it! BUT, back to my point. Not the best at coding or just knowing what to mess with in here and if you had it written down or could give me some tips as to how to move the panels and items to the GUI that we can still click on and moved around.
Again, thank you for the tip about making sure it ran AFTER we moved the view and for being so quick to reply!
If you already solved the problem with the view there’s no real need to move everything to the gui layer imho.
I’ll be releasing a new version in a few weeks that already uses the draw gui event instead of the regular draw, but it’s just to avoid the problem you had about the twitching since it’s quite common. It doesn’t solve obviously the view zoom / rotation / resolution problem since, as said, it really depends on how your game is structured and it’s not really a inventory issue, but a more generic GUI one.
Super cool! I look forward to the update. Ill change over when it comes out : ) Thanks!