MPPlantOfficial's Forum Posts

  • Gotcha, so that's done ... but the scroll when the player leaves the "camera" box is very jerky regardless of which number I use.

    Hmmm.... Then maybe you should decide on a different position for the camera box and not use that:

    "camera x is overlapping player" statement. I can imagine the Y component of the camera is constantly catching up and re-centering.

    Try : Set Camera.Y to PlayerAnimations.Y - 200 (or the distance you're comfortable with) or something. Only the X component has that "catching up" effect and the Y is constant.

  • sprite

    Yes now all you have to do is invert the 2nd statement just like last example.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • However when the player leaves the "camera" box because they are not overlapping it anymore, the screen jumps to the players position very sharply. How do I smooth this out?

    Well it gets that instant jumping into position because you are setting it PlayerAnimations.

    Use LERP to get that that "camera catching up to player" effect.

    Every Tick | Box set X to lerp(Self.X,PlayerAnimations.X, 0.5)

    x Is overlapping PlayerAnimations | Box set Y to lerp(Self.y,PlayerAnimations.Y, 0.5)

    You can increase or decrease the scroll speed by replacing the 3rd element of the lerp which in the example above is the 0.5 quantity.

    Try replacing it with 0.2-0.9 and see what best fits your needs.

  • The player animations sprite has the scroll to behaviour, however when the player jumps it also scrolls up and down as it follows the player completely. I'd like the camera to follow the player horizontally, and only move vertically when they go outside of a defined zone.

    That's why you should put the SCROLL_TO behavior on a separate invisible box so you have complete control over it.

    Of course you wouldn't be able to have the degree of control you want if you put it on the Player itself.

  • Well for the rest of the game just create a box that has the SCROLL TO behavior and at all times set its position to the torso of your Player sprite.

    But for:

    Where X enters the door, you have to move both your player and the box. The box moves to the center of the room slightly faster than the player and the player's animation as well as physics is halted for a while. It's all about dividing all motion into subcomponents.

  • Hey Josek, are you planning to make plugin for the newly announced Admob Rewarded Video?

  • Physics.

    While stretching your rubber band, just do :

    every X seconds | Projectile spawn Balls

    Give the balls a Hang_Time instance variable

    Every tick :

    | Set Balls X to [Equation] x(t) = x0 + v0xt

    | Set Balls Y to [Equation] y(t) = y0 + v0yt – ½gt2 (Btw, You need to modify this to negative since Y axis is reversed in C2 )

    | Balls Hang_Time + dt

    Here's some additional reading:

    http://scipp.ucsc.edu/outreach/04Projec ... Motion.pdf

    https://www.maplesoft.com/content/Engin ... Motion.pdf

  • :twisted: I have 100 of that sprite and i wanna check the distance of all of them with each other, so if the distance of one of the instances is less than 50 with another instance something happens to them.

    How can i do the above scenario?

    Loop each instance to detect distance w/ respect to other instances.

    Look at how loops work first.

  • For the walking animations, add "is on ground" as an additional condition.

  • if Sprite(0).X > Sprite(1).X

    compares instances 0 and 1.

    Note: You CAN'T do this automatically. Autocorrect would only be able to get 'Sprite.X' you really HAVE to go back and retype the "(number)" part.

  • Hey guys. In relation to this, how do I save other sprites' instances and their respective placements per level?

    What if I have multiple instances of a specific enemy in level 40 and 0 instances in level 1 or something?

  • Someone told me to go here and DL the plugin. What should I get?

    Are these still up-to-date?

  • 10. Freedom Force vs The 3rd Reich

    9. Tenchu 2: Birth of the Stealth Assassins

    8. Silent Hill Shattered Memories

    7. Chrono Trigger

    6. Legend of Zelda: Majora's Mask / Legend of Zelda: Oracle of Seasons

    5. Diablo 1

    4. FTL

    3. Bioshock 1

    2. Fallout 2

    1. Fallout New Vegas

  • Best example:

    Subscribe to Construct videos now
  • I want to make a game where there is two tanks which shoots to themselfes

    SAY NO MORE.

    Here you go: https://www.dropbox.com/s/tj8iqiob5vy8c ... .capx?dl=0

    <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink"> <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink"> <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">