LittleStain's Recent Forum Activity

  • You should not spawn the bullets on the background layer, for it has paralex 0,0. spawn the bullets on the layer the player is on and you will not have these problems

  • When player and turret are in a container, creating one will automatically create the other.

    Wouldn't it be much easier for the ship to spawn the turret when needed and pin the turrent to the ship on created?

  • You do not have permission to view this post

  • I'm not familiar with the plugins, but without them it could be easily achieved with this event:

    button on touched : set timescale to -timescale+1

  • If you'd like to know how to use lerp, Yann's explanation about lerp is probably the easiest to understand:

    Lerp is a very simple function

    Lerp stands for Linear intERPolation

    This function need 3 numbers parameter

    lerp(a,b,t)

    a and b are whatever number you want

    but t goes from 0 to 1 (well it can go under and over but... let's keep things simple)

    lerp(a,b,0) returns a

    learp(a,b,1) returns b

    the values in between 0 and 1 returns a number X between a and b such as X-a = (b-a)*t

    so t describe more or less where you are in between a and b

    lerp(a,b,0.5) return the middle so a+(b-a)/2

    lerp(0,10,0) = 0

    lerp(0,10,1) = 10

    lerp(0,10,0.5) = 5

    the way newt use it with

    sprite set X to lerp(self.X,destination,0.5*dt)

    is a little trick

    the .X you have in the lerp is the .X you change in the expression

    and 0.5*dt is always more or less the same (depending on fps)

    so from step to step in the movement, destination-self.X will be shorter and shorter, so the lerp(self.X,destination,0.5*dt) will continue to move the sprite but slower and slower (ease out)

    In short the only issue with this technique is that the sprite will takes time to exactly get to destination. Mathematically it should never arrive but thanks to float rounding stuff it will.

    Anyway you should not rely too much on

    if sprite.X = destination

    that's all :D

  • If you open the move to mouse example which ships with C2, you'll see it uses a distance is less than 20 pixels condition to stop the movement.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not sure what you mean by set to x action.

    if you are trying to stop the bullet at a certain x position it is very possible the bullet is never at that precise x position.

    The bullet moves a certain amount of pixels every tick, so it could be it's x position is never exactly the position you specify.

  • You could give the object bullet behaviour and set it's speed to whatever speed you want and it's angle to 90 degrees.

  • You probably already have the audio object in your game, for you had that one sound right?

    In your event sheet you can now add an action play audio under any event and it will ask for the name of the audio file you want played.

  • These issues probably won't be solved without the capx.

    you could just put the link to the capx in your message as plain text , so without it being clickable.

    I guess the easiest way would be to turn off collisions for the time it takes the player to get to it's starting position. Or to only activate or create the solids after the player has entered the room.

    Also try to make sure the character has no interaction with the menu and inventory button.

  • to check if the boolean is set

    add a condition.

    player - is boolean instance variable set

    to check if it isn't set

    invert this condition by right clicking it and selecting invert

  • -- stands for a subevent

    stands for an action

LittleStain's avatar

LittleStain

Member since 26 Apr, 2011

Twitter
LittleStain has 4 followers

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies