RBuster's Forum Posts

  • 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.

  • 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

  • Try Construct 3

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

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

    Try to use only the "familyname" instead to use "girasol".

    It would be better if I could see your script. Could you provide your CAPX?

  • Use a variable of boolean type (true / false) on the family itself, to control it. When the image is correct, change the variable to "false" in the moment before destroying the sprite. In action in which you create a new sprite, put a new condition for the spawn occurs only when the boolean variable is "true".