Ofrst's Forum Posts

  • 15 posts
  • Type interval already has default value. It doesn't really need to be defined second time. Here is capx of the source with additional lines. It writes text but it doesn't stop on the fullstop.

    easyupload.io/a8i9gz

  • Now it doesn't start typing at all.

  • I want to make the text print until it reaches a fullstop. Then it pauses for a second and then continues where it left off. I managed to make it register only the first fullstop, pauses and then ignore all other points. how to make it register all the fullstops in the text. I tried all kinds of things, even some illogical ones. Trigger once while true, every tick, make a function and call it somewhere else and I didn't succeed. Also, is it possible to make it pause when, for example, the cursor reaches the end of the line? I also wanted that when the entire text is printed, there would be a pause sufficient for reading - I tried to put some special character at the end of the text so that it would register the end and pause, but it didn't work.

  • Parallax for GUI is 0,0 and scale rate also 0. All items that GUI uses are on that layout.

    There is same UI layer in other layouts where it is overridden with Global. If I put global on inventory slots then When I'm switching from one to another layout it doubles the inventory interface. One that is moving with the camera which is empty and another that is full with items picked on previous layout but on the wrong position and not moving with camera.

  • I solved the problem in the most primitive way. Later I will study the possibilities and write it more nicely.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If I put on those slots that they are global, then they remember all the items that were in them and that seems to me to be the best solution, the only problem is that it will not scroll together with the camera anymore, as if the parallax it uses is canceled.

  • This is function that is used.

    And this is part when you pick up an item.

    Now I'm interested in how to read the values in the array and then display them in the same order in the slots in the simplest way without without unnecessary complications.

  • I have a global layout that serves as my GUI. Array and variables are of global type. There is an inventory of three places that is filled when an item is picked up. It works in such a way that it switches to the appropriate frame of the animation on which a certain item is displayed. When I switch to another layout, the item picked up in the previous layout disappears in those places. The function and array work fine. If I set these item slots to be global, then I get a copy of those slots at the beginning of the screen, which do not move with the camera, but are filled with right items.

    I tried to put behavior persist on the item slots, I tried to use the pin for the main element of the GUI, but nothing helps. The slot is filled when an item is picked up. Would at the beginning of each layout somehow have to say that all the items picked up in the previous layout are reloaded into the slots in the new layout. I've been struggling with this for quite some time now.

  • I want to check is there a empty space in array and if there is, I want to write name of the item that is previously stored into item global text variable.

    So I got global variable I, global text variable item, which default value is "empty" and array InvMission that has Width 1, Height 3 and Depth 1. It also has default values on all three slots "empty". Don't know what's wrong but it only fills only 0,0 of a array with the name of item that is picked up first.

  • Now I have 1 for width and 3 for height and it works. If width is 3 I can't see it at all in the debug mode. Thanks for help.

  • It works now, but I added height 3 also. I thought that if I would have 3 rows (width 3) that would be enough to store three item names.

  • It seems to me too. Does width indicate the number of columns? Here are my array properties.

  • Thank you for you answer.

    It's confusing because I would expect a list containing three items(text) in array, maybe three rows where I can store text value and I only see row 0 when in debug mode.

    For now I added new condition so icons would be created on the right slot, but I would like that icons appear on the first empty slot.

  • Hello, I'm beginner.

    I'm trying to make inventory with only three slots.

    I made an array with width 3, height and depth 1. I also made sprite slots with SlotID instance variable. Every sprite instance has different SlotID, 1,2 and 3. How to use that SlotID instance variable to create picked item icon on exact slot? Also, what would be best way to make such inventory so I can add any picked item to it? I don't want to hardcode specific items because there would be a lot of them. What I have until now is really primitive and the last part where item icon has to be created on exact slot is not working. This is first part where you pick up item.

    and another one where I'm trying to create item icon on the slot.

  • Hi,

    I'm new to Construct.

    I got door that I want to open when player is overlapping and when key E is down. I also want that pushing E again closes the door. I managed to make door open and it works good until I add second part where doors should be closed by pushing E again.

  • 15 posts