lionz's Forum Posts

  • For the collapse I don't think any code is wrong, it's just missing. When you open it and set the slots to x+200 you need to have the ones that are not active move x-200 on a close. That's about it, so double tap on inventory when inventory open =1, set inventory open = 0 and move the inactive slots -200.

  • Hiya,

    1. That will likely be a picking issue, you can't really say AI do such a thing as it will apply to all AI at once. You need to give them states which can be done in variable form. Try 'waiting' or 'roaming' and say if AI is waiting do this, or if AI is roaming do this.

    2. You can select an AI with the mouse and then set a variable on the AI to true. While this variable is true you set the player angle toward the AI with condition where this variable is true.

  • The problem here is that it's not really a very simple inventory system and you've gone about it in a very visual way which means there are tons of global variables and redundant code. If you are making something like this it would be best to use an array then it can be done in several events, looking at your events it's just too difficult to work out what's going on, also if you plan to expand this in future it is going to be a bit of a nightmare. I would start again with an array where your inventory slots are 0,0 1,0 and 2,0. You can then put the amounts of those items and add to them at 0,1 1,1 and 2,1 which would solve your problem. Then when you are swapping items they move between 0,0 1,0 and 2,0 slot where 0,0 is always the 'active' item. That in itself would also be somewhat difficult for a beginner and if you are new to arrays but hey that's inventories :)

  • Great, no problem :)

  • Ok to run more specifically you can do :

    For 0 to array.width (system loop)

    Array compare at xy 'loopindex' for x, 0 for y. value = '4'

    That will run through all x at y=0. This means it only checks the first row looking for a 4.

    Then when its true you add the curx to local variable against array.at(localvar, 1) to get the amount for 4.

  • Array : Contains Value '4'

    Set local variable to current x

    If array.at(local variable, 1) = 10 then true / log hello

    Array : Contains Value '6'

    Set local variable to current x

    If array.at(local variable, 1) = 5 then true / log hello

  • Yeah not sure what I'm doing with potions although plan was to have lots of different types and they cure status effects. I guess use them in the individual character inventories to heal themselves, but I also thought they could use items at random during a battle. They may pick items based on a need to heal or they may have to learn how to be tactful with items, using anything at random during a battle to begin with and then becoming cleverer.

    I also have plans to add in a thief class who steals items during battles, which is useful for gaining more items but if you don't have enough slots freed up then you would lose the game.

  • newt hmm what do you mean specifically by item strengths? The idea was to possibly combine items that can be crafted, ore into weapons if they have a Smithing ability and herbs into potions if they have an Alchemy type ability. You would just equip melee/armour to the character to make space in the inventory and discard old ones although you could keep some back ups around, it'll be about deciding what to keep. Are you talking about a kind of repair system where items have strength points and become broken over time?

  • I checked out that game, looks fun. I didn't imagine any kind of match 3 mechanic although you could combine 2 items or keep combining them if possible. The items in your inventory would be important to battles too so it would be about keeping that balance of free slots and helpful items to use. At least in my mind it's nothing like this game but we shall see...

  • I just had an idea for a game, maybe it already exists in some form, where the main focus is on emptying an inventory.

    Picture this...it's rather text based where you don't see battles but rather the aftermath only (or possibly by turn) and you select options after doing the inventory sorting.

    Each member of the party has an inventory and your main goal is to keep it with free slots or you lose. So at the end of battles they will randomly pick up loot, boss battles are worse to come across as they pick up more loot. You then get a chance to clear it out before continuing. There will be certain techniques you can use to clear items.

    Crafting - a random character can build items from a combination of smaller items clearing slots. Potions - a random character can combine potions you pick up to make more powerful potions and clear slots too. Something where the character will not automatically pick up loot could be a useful skill.

    Obviously as well as the inventory the items are important. They can be used automatically in battles by your chars. Potions and consumables can be kept to be used in battles, but at what cost? Oh yeah, it fills up your inventory.

    You can also equip items to characters to keep them out of the inventory and discard old ones.

    There would be upgrades along the way. Inventory can be made bigger etc.

    I think it would be fun because things like storing items, boss battle endings and random chests become bad things. Getting rid of as many items as you can (while tactically keeping some in the inventory) becomes more important. Also I really want a chance to have the item that fills your inventory and ends the game have a pop up, you've been killed by BREAD.

  • Use a global layer. If you add a layer called HUD, make it global and add HUD layer to each layout, it will consistently use the objects across all layouts. You can add HUD elements only to your first layout on the HUD layer and it'll show them throughout the game.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah as previously mentioned I've never seen a reset game button and I'm not sure why you've included it. Surely it should just be New Game which starts fresh or Load Game which loads a slot. I'm not sure what reset game does, even as a player I would be wondering.

  • The point is that when you press New Game it should go to an initial state of your game, nothing to do with loading or saving to slots.

    The info you need to provide is how does your game save, when should it save? If my suggestion of the save menu doesn't apply then how are you doing it?

  • Haha no problem :)

  • Your last event says len(text1.text) instead of len(text2.text)