Zathan's Forum Posts

  • I know it's super simples to get every instance of an object that have a specific property or tag, but how can i get all the instances of all objects that have a tag?

  • Thank you very much for the help, guys!

    Very cool system, paxclara. Probably i will go this way too for now.

    For the Construct team: C3 is AWESOME, but i think this is some of the most basic needs of every game developer. The input and rebind system of a game need to be robust. It would be so good if you guys could add this in a future update!

  • In most game engines, there's typically a system to create key/action mappings like:

    {
    	"jump": "Spacebar" | "Gamepad A",
    	"interact": "E" | "Gamepad B"
    }
    

    This allows developers to reference actions like "jump" in the code, instead of hardcoding specific key presses, and easily modify key bindings at runtime so players can remap controls as they prefer.

    However, it seems that Construct 3 doesn't have a built-in system like this, which seems a little weird to me.

    Is there currently a way to achieve this functionality in Construct 3?

    Thanks!

    Tagged:

  • I'm guessing you have different events for different sprites?

    Mouse -> On Sprite1 clicked -> (start dragging Sprite1)

    Mouse -> On Sprite2 clicked -> (start dragging Sprite2)

    etc.

    Just create a flag (a global variable) isDragging. Set isDragging=1 when a sprite is clicked, reset to 0 when it's dropped.

    Add a second condition to all these events:

    System-> isDragging=0

    Or if all these draggable sprites are in a family, and you have just one event (Mouse->On DraggableFamily clicked), add DraggableFamily->Pick Top Instance as a sub-event.

    Yeah!

    It worked very well

    Thank you!

  • I'm making a custom drag n drop behavior with events, without using the built-in behavior that is very limited. I'm using physics and the touch object. Everything is working fine, except for one thing:

    I disabled collisions between the draggable objects, so they can overlap each other. And here is the problem... when there is more than one draggable objects overlapping each other, if I click to drag, everyone is activated, not just the top one. And it is different sprites, not just different instances of the same... so I just can't figure out how to work around that.

    How can I manage to fix this?

  • This replicates the 8 direction behavior with events except solids won't affect it.

    https://www.dropbox.com/s/0jfbslxhy9ded ... .capx?dl=0

    The custom movement behavior would add little other than handling the actual motion and max speed clamping.

    Thanks guys!

    And R0j0, you're the lord of c2! haha seriously, thank you very much.

  • I need an object to be controlled by WASD, with acceleration and decceleration.

    It will be "flying" by the level, and it can't collide with anything (most things in the level have the solid behavior), BUT, it need to register overlap.

    So... as the level is solid, I can't just use the 8direction behavior, cause the object will collide with things. And if I just turn off the collisions for the object, I will lose the overlap data that I need.

    I tried to use the physics behavior in the object, but the gravity controller is global, and I have other things with physics in the level, that would not work properly with gravity 0...

    How can I work this out?

  • Bump plus!

  • Bumpy!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Bumping bump

  • Bump

  • Take a look in this capx: https://1drv.ms/u/s!Ai2wcz1Xix0ygbw-Kut8SzIyAucWVA

    It contains pretty much what I need, but I want more control in the camera movement amount. I don't want the camera to move that far away from the middle of the screen when the mouse is on the screen borders.

    Any tips?

  • Zathan

    you probably want to change the set BarMask width event to say: lerp(Self.Width,(100-Water)*150/100,3*dt)

    that reverses it...

    That's it!

    Thank you very much.

  • Unfortunately, you'll have to see the capx to help me

    The bar isn't just a rectangle, it have rounded corners. so I needed to use 3 sprites: bar fill, bar border and bar mask.