ChenBr's Forum Posts

  • Hello,

    In my game I move between rooms, I have HP, Armor and more variables.

    I was wondering what is the best way of making multi rooms, should I make more layouts? is there any other way?

    If I need to create more layouts, how do I save all the stats?

    Thanks!

  • I'm not sure I understand what you're trying to do, are you trying to make them visible while touching, or you want it to stay visible after you make a click?

    Can you show the event sheet?

  • If you move the finger outside the sangPad, dragging will be interrupted, because sangStick can't move further.

    That's why you need a separate invisible sprite that can be dragged freely.

    It's a popular trick, you can see an example here:

    Oh, now I understood what you meant!

    Successfully did it, thank you very much

  • You can't use drag&drop on the same sprite.

    Create another (invisible) sprite with Drag&Drop behavior, say "dragSprite".

    Remove Drag&Drop behavior from the "sangStick".

    Change events to this:

    dragSprite is dragging -> set AreaAngle to angle(sangPad.X, sangPad.Y, dragSprite.X, dragSprite.Y)

    .................set AreaDistance to distance(sangPad.X, sangPad.Y, dragSprite.X, dragSprite.Y)

    The rest is the same.

    When not dragging, return both sangStick and dragSprite to sangPad posision.

    Shouldn't that work?

    I don't really understand why I need to use a second sprite to define the drag, the drag also define me the conAngle that defines the player movement, there's no way to use the same drag and drop that I already have?

    something like that

  • Like that?

  • Here you go:

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

    You can replace event #2 with this:

    Small->Set position to Big

    Small->Move at angle (angle=a, distance=d)

    Hey, I was trying to do the same like that

    But it doesn't work, maybe becuase of something that is written here?

    Thanks for your time

    Edit: I have 2 joysticks in the game if that matters

  • Here you go:

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

    You can replace event #2 with this:

    Small->Set position to Big

    Small->Move at angle (angle=a, distance=d)

    Thank you very much!

  • Hello.

    I have a joystick in my game that is working with no problems.

    Now, what I want to do is settling the dragging area, right now, it doesn't matter where I drag the stick, it will just follow wherever I touch.

    So I want to define the stick a specific area that the stick couldn't get out of.

    This is the stick

    And I want it to not be able to get out of this area

    But, when I'm out of this area with my finger (or mouse), I want the joystick to keep dragging the stick, so I could get the angle from the joystick virable, but the stick won't bother the player while he's dragging the stick (whenever the player is dropping the stick, he gets back to the original spot.)

    Thanks!

  • What about doing something like that?

    If you have more than 1 frame, you can add another virable that will include the number of your frame (each time the frame is changed, he gets 1)

    this way you could change the frame to 0 + FrameVirable

  • So the problem is that the numbers are growing infinite?

    What about making a loop that ends after 1 loop (or more if you want to)

    Or the loop (Object b weight gets bigger) only when a condition is happening

    If I got you wrong again, can you describe to me again what are you trying to do, we more details, even screenshoots?

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello.

    By typing ObjectA.width = ObjectA.width + ObjectB.width you're giving Object A the width of Object A and Object B together.

    Why don't you just give object B width the width of Object B?

    ObjectA.width = ObjectB.width

    Let's say you want it to change whenever Object B width is being changed, you can do}

    Every tick --> set width ( of object B)--> ObjectA.width

    Did I get you right?