Juryiel's Forum Posts

  • I'm using an edit box as part of an inventory function tht takes input from a player. Space bar is used to open and close the inventory. If I set focus on the edit box it works great. However, if i later set focus off (using the action) or disable (again with an action) the edit box, although those functions work, spacebar no longer opens or closes the inventory. It is clear that the edit box is still intercepting the keypresses because if i set it to read only or don't disable / defocus it spacebar will work correctly). Any way to get around this?

  • I shoud clarify, the items are created using Create Object by name, off a dummy object with that ID. The dummyobject is in an Object Bank layout.

  • Can i do that? I have two items with the same ID private variable (in the Item family) and none of the'Pick' actions seem to differentiate between the two (all actions happen on both).

  • Ahh figured it out. Apparently the 'Drop' click also counted as a 'Pickup' click for the item that was being dragged on the mouse. Weird because the 'Pickup' group is disabled when the mouse click is made, and it is the mouse click that enables it so i didn't think it would do that. The items that worked happened to have transparencies at the mouse cursor so they didn't get picked up

  • Hey guys,

    In my game I'm trying to code an inventory system. Items can be picked up with the mouse when clicked and dropped when a click is made with an item on the mouse. A pic of the 'Drop' events is attached.

    http://freeebayimagehost.com/images/nuh ... qccktg.png

    When the item with ID OnMouse is not over an equipment slot and it's dropped, the code shown under that condition should run. For one of the items, it works fine. For all other items, the quantitytext is never destroyed even though the system message pops up with the correct private variable IDs for item and quantitytext. In addition, the Enable and Disable of the two groups never happens. If I click "OK" on the message boxes, it does work, but if i use spacebar on them to click OK, or if i take them out entirely it doesn't work. Any ideas?

  • Thanks, I was looking how to get the currecnt scroll position but couldn't find it. ScrollXLeft and ScrollYTop work

  • It is on such a layout (and needs to be). Anything I can do to get around that?

  • So I'm trying to set the position of an object (edit box) to MouseX MouseY but it's setting it to some odd (but consistent) location. I tried both relative and absolute positions. Any ideas?

  • Hmm good idea. Is it possible to disable keyboard keys? I could try doing that too.

  • Thanks, but that doesn't take care of the second part. I don't want them to be able to type letters in the edit box at all

  • I want to be able to pop up some sort of input box (e.g. like the edit box) that the player has to fill in with a value before being able to do anything else. It's for an inventory function so time scale =0 won't work for this since it is already zero, but there is inventory functionality happening (e.g. dragging and dropping items around). I also want to have it limit the input to a number. I don't want to check whether the input is a number, but instead I just want to disallow typing letters entirely, such that trying to type letters will not work (e.g. hitting a letter while typing will not make the letter appear).

  • Well, I'm trying to have a hash table that has set values by me on load. An array is not suitable for the task I'll be using it for. I can do that using the actions in the engine, but that's a bit annoying as the number of keys grow. However, it seems I'll have to do it that way

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Is it possible to read a text file into a hash table, and if so, what format is used? I tried saving a hash table but the format it came out in wasn't human readable in a text editor (although the key names were, the values were not).

  • Can i do this?

    For example, let's say I have a family Items, with teh private variable Category. I also have a bunch of global variables such as Weapon, Boots, Gloves, Helmet, etc, each set to its own number (Weapons =1, Boots =2, etc). Then, when I check the value of the private variable Category, which is a string, it might return Weapon, which I then want to convert to the corresponding number 1. So the expression would be global('Items.Value('Category')') which I would wnat to return 1, but it doesn't. Any way I can do that somehow? I realize I can just skip the global entirely and make category correspond to the right number. It's just easier in the long run to have text categories instead of having to refer back to a document for what each category number is.

  • Hahaha sorry to be keeping you up at night! This approach sounds like it'll work, thanks!