TELLES0808's Forum Posts

  • Use persistent behavior on these enemies.

  • Condition: System>Pick by comparison: "Desired item to be picked" with Item.ID = OverlappedItem.ID

  • Drag and Drop Inventory System — Now for sale in the Scirra Store!

    https://www.scirra.com/store/royalty-free-game-templates/drag-and-drop-inventory-system-3086

    <h3>Drag and Drop Inventory System</h3><div class="deshr"></div><p>You can make your Inventory looks fantastically easy to use with this innovative template easily and effortless.</p><p>The drag and drop behavior is fully compatible with mobiles and computers, also, it's light and speedy.</p><p>This template is a work thought to be easy to use, also, as it don't use families, arrays and plugins, you can use it with a Free License of C2. The events are fully commented in every step and the logic are simple to follow thanks to the debug system on screen while in preview mode.</p><p>It is a work in progress, it means that I'll be updating this template over time with more features and improving performance, reducing events and even more, free of charge. Desiring something else and don't knowing how to implement or found a bug, unstable behavior or just want make a question, drop me a message and I'll help you.</p><p>If you're new to Construct 2, you'll be able to manipulate it with minimal knowledge, plus the support of this template on the forum will give you confidence to implement, exchange or simplify the system easily.</p><p>As an older user, I believe this template is the first of it's type, with Inventory, Dropped Bag and Equipment Behaviors ready to be used in any game, including RPGs, Adventures, Shot'n'Run, and an infinity type of genres where an inventory is always welcome.</p><p>Learn from it and show me your game, I want you success with style. Thank you!</p><p>Features:</p>

    • Easy drag and drop system;
    • Inventory behavior;
    • Equipment behavior;
    • Dropped Bag behavior;
    • Trash can behavior;
    • Awesome slime behavior;
    • Awesome moon;

    <p>Thank you!</p><p>Changelog</p>

    • R1.00 - Release to the public;

    Use this topic to leave comments, ask questions and talk about Drag and Drop Inventory System

  • While B = C: randomB(10)

  • It's just the basic, you need to improve it with more AI. =]

  • The system>Create object only accept numbers as far as I know, while placing "" will turn it into a string.

    If you know where the player should go, pick this coordinate as number and setup the System>Create> to that position.

    For example, if you want the player go to slot 11, and you know the name of the object there, just setup:

    System>Create>ObjectPosition11.X,ObjectPosition11.Y

    Where ObjectPosition11 is the name of the object on position 11.

    To know what object you should pick before setup the creation system, pick it using, now, a string like this:

    Condition: System>Pick by Comparison>ObjectPosition & DiceResult+PlayerPosition

  • Its not working the bound to layout behavior? Also, checking if the item is overlapping the wall before running its events should be enough.

    Sample CAPX: https://dl.dropboxusercontent.com/u/470 ... %20AI.capx

  • I prefer to use events instead of instances, where you're able to setup everything in a visual way, but that's just a personal preference.

    Did you tried to run it once using the "Run Once While True"?

    Without analyzing the whole code I can't help you to workaround it with a different logic.

  • You should check the item before destroying it, otherwise, any of that item will be destroyed, because you said it, destroy all items of that type, while not giving the system a path to select the right item.

    If you want avoid it, try checking what item was hit and pick it in the event.

    Something like this:

    Sample CAPX: https://dl.dropboxusercontent.com/u/470 ... ullet.capx

    After picking the correctly object, you can make one less step by working in another way.

    Making a container. It's smart because everything inside the container will be destroyed, so, any armor or weapon spawned by that object will be destroyed with him.

  • It may help: https://www.scirra.com/tutorials/361/un ... moke-trail

    By the way, I'll explain you the easiest way to pick the object.

    First, you should know its UID or at least something to identify it in the runtime.

    I prefer to use instance variables in the object itself, works great too.

    When you create the object in the function, set the instance variable in the sequence, like this:

    Sample CAPX: https://dl.dropboxusercontent.com/u/470 ... ction.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi BACLog, I first did with, but the actual sample was made as it is just for the challenge =]

    I noticed the whole inventory is an array of objects, for a fixed quantity it's not necessary to setup an array, but if you do a dynamic inventory, where the slots increase it's size, so, the array is most than necessary.

    The whole eventsheet will be changed again, to compact it to 20 events or near or it (plus the debug on screen events) and maybe an array become necessary.

    The first time I used arrays I noticed:

    For this type of inventory, where you drag an item over another and they swap, you need to know the origin and the destination.

    The destination is important when you're over the equipment slots, so, you need to check what type of equipment is being dropped;

    The origin is important when you're dragging an item from the equipment slot to the inventory;

    Knowing this, arrays was not useful because any check to manipulate it can be reached by directly manipulating the objects involved in the movement.

    Next step is implement new behaviors, like to find the first slot available when you drag an item from the equipment slot to the inventory, and it can be done by checking an array or checking the first slot in the inventory not overlapping an item (what the array also need to know, to manipulate itself).

    Here is the problem, any additional check to manipulate the array can be used without the array and directly to the logic by setting instances variables or simple global variables, making the events simple.

    But, later I'll be implementing quantity for consumables and others items, there I can use an instance variable directly to the item or an array.

    ------------------

    Updated. Now it's free of bugs, also, I changed some layout elements and implemented a cute slime to be slashed by our finger

    I'll be updating the Arcade soon, hope you like!

    ------------------

    Arcade Updates

  • Thank you! I already figured out how to work properly by checking the overlapping and setting variables, them picking the object by the UID using the stored variable to work with =]

    By the way, you opened my eyes, it's kinda different from Unity in many ways =\</p>

  • Hello,

    I was out for at least some months, busy with an incredible amount of work, but now I can return to my preferred hobby <img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing">

    Let's talk about this Drag & Drop Inventory System. This inventory system is made without the use of arrays and families or functions, but need some improvements to reduce the amount of events.

    I'm planning to make another version with the use of families, reducing significantly the number of events by the simple fact of complexity while dealing with items of the same type overlapping each other.

    It's needing some improvements on the items dropped on the canvas, but at least it's working fine in the bag and equipment area <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    You can play the actual demo here on Arcade: https://www.scirra.com/arcade/tutorial- ... 0808-13249