RBuster's Forum Posts

  • Hi

    It's similar, but In my case the object must continue to be dragged so I can take it to another place. In my project the object returns to the original place when I drop it.

  • How to make the object with Physics behaviour, stop at obstacles while being dragged (Drag and drop).

    Thanks

  • Would Lerp work in this case?

    lerp(a, b, x) (there is also unlerp)

    Source

    A = Starting Position (such as the X or Y of the object IE. object_name.Y)

    B = Position to Reach (such as object_name.Y + 50)

    X = Percentage or otherwise interpreted potentially as speed. (Ex. 0.3)

    LiteTween might also work -

    Thread

    I personally haven't used LightTween. It looks nice though and I'll likely download it to try it out.

    Index: Simple and straightforward explanation. I had great difficulty understanding Lerp. Many thanks.

  • PhilWilky

    It's easier when we can see the CAPX, but I think I get it now. You need to compare the frame when occurs collision between the sprites.

    Event: Sprite (hero) >> On collision with another object (on collision with enemy)

    Subevent: Sprite (hero) >> compare frame (= Animationframe hero / sword frame number)

    Action: Destroy enemy

    I hope now your problem has been solved.

  • Hi PhilWilky

    I do not know if I understood your needs, but if the issue is collision when change the frame, you can resolve this by setting the boundaries of the collision polygon.

    Open the "Edit image" window and click "Set collision polygon", then click the right mouse button on one of the points and choose "Guess polygon shape" and make adjustments as necessary.

  • RenatoB

    We need your help to track down the problem with splash screens. To test it, I made 2 different splash screens for landscape and portrait and verified that it brings up the proper splash screen for each orientation. This was for the XHDPI splash screens: 720x1280. I am guessing that you are seeing the problem on HDPI or some other resolution, but I can't test that without a phone. Is there a way you can do the same experiment with your phone so we will know which resolution has the problem?

    Hi IntelRobert

    The problem occurs when I turn the device (moto g). It seems that the image does not change and is stretched or compressed to fit on the screen.

  • Hi PhilWilky

    I believe the best way to do this is through an animation. First insert frames in the sprite with all the heroes and change the speed to zero. Then put an event to change the frame of this sprite each time you press the space key.

    First add the "keyboard" object.

    Event: on "space" pressed

    Action: Sprite>> Set animation to frame 1

    Good lucky!

  • Thanks, henriquesv

  • Hi

    Thank you very much. It's exactly that I need.

    I tried to use "compare two values" event but I didn't know how to organize the code. It's really simple after someone does, mainly with this excellent explanation.

    I believe many people will benefit from this solution.

    Thank you!

  • Please, any more suggestions or explanations concerning the 's suggestion? Thanks.

  • Hi Toby12

    I've the same issue. Could you publish the CAPX again for I check if it has the solution that I need, please? Thanks anyway.

  • Hi DAG,

    I need to solve this same issue, but I would like to use force toward position to get more realistic effect.

    Do you have any example of how to apply it? Or even an example about your suggestion in the first reply? Thanks anyway.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi ,

    Thanks for helping. I understood the logic but I need some help to implement it.I think it is okay to use variables that hold position values (Pos1X/Pos1Y/Pos2X/Pos2Y) to test the second selection, right? But I do not know what event I need to use.

    Other question: is possible gather AND and OR in the same event?

    Thanks

  • Hi,

    I am unable to restrict diagonal movements. I am attaching part of the project below so that you can access and give me some ideas.

    Thanks

    https://www.dropbox.com/s/ry61lrpa1a0h324/puzzle_test.capx

    Obs.: This project use LiteTween plugin