RayKi's Forum Posts

  • Try using the function Lerp(a,b,t).

    A and B are main values and T is a value between 0 and 1 that represents a position between A and B.

    So Lerp(0,10,0.5) will return 5.

    Knowing that you can set the position of the camera to be somewhere between the position of the camera itself and the position of the mouse.

    That way if the camera and mouse position are the same, Lerp() will return the current value, therefore setting the camera at the same place. If the player moves the mouse only a little, Lerp() will return really small values, making the camera move only a little and really smooth. And if the player moves the mouse faster and farther Lerp() will return bigger values moving the camera faster to where the mouse is.

    Note that the values of Lerp() will be always changing, so the camera will start moving faster if it's far from the mouse, but will decrease it's speed as it gets closer to the mouse, giving an really nice and smooth effect for your game.

    I use it all the time, you should try it.

    The code will be something like this:

    Every tick > Set Camera X to > Lerp(Camera.X , Mouse.X , 0.5)

    Set Camera Y to > Lerp(Camera.Y , Mouse.Y , 0.5)

    Note that you can change the last number to try and adjust the effect to be the way you want.

    A higher number will result in a faster camera movement, being 1 a instant transition, while lower numbers will result in a slower and smoother camera in a way that 0 won't move the camera at all.

  • I don't see why it's not working. Maybe there's another misplaced trigger somewhere, I don't know. Try uploading a capx. file so we can take a better look on what's going on

  • The slide bar will have it minimum and maximum values set by you, and the sound volume has 0 as original sound, positive volume amounts will increase the volume and negative will decrease.

    Just create and event to every tick, or every time the user change the bar values the value of the sound volume to be set as the value of the bar.

    In addition to that, you can create a condition that if the value of the bar is equal to it's minimum then the sound should be muted

  • Create a object to be your camera, set to the object the "scroll to" behavior, this will make the camera follow the object.

    Then in your event sheet create a event to set the X and Y of your camera object to the X and Y of your mouse every tick

  • I would create a invisible object to be the area. It doesn't have any behavior or anything, it works just as a collision area. You could try that

  • The first time I created a achievement system like that I created a single object and set a different animation for each type of achievement unlocked.

    Then you create a single invisible object on the screen and change it's animation every time it appears. It worked really well form me.

  • You should start simple, create a straight line solid object for ground, and create a object with a simple shape of collision box.

    Add only one behavior and adjust it little by little and as soon as you start to understand the behavior itself you add others and see what they do.

    Take your time to play with construct and read about the functions and behaviors so you can get really comfortable with the programming.

    After that you can easily develop the algorithm to develop the game just the way you want.

    I can't help you any further because I'm no expert, but if you really need a sample to follow try looking at the tutorials or at the arcade.

  • No, I don't think that's possible.

  • If think you can achieve that just by playing with the game gravity, acceleration, fall speed and stuff like that

  • Yes, I would like to know that too. How do I upvote this question? lol

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Create a "A" variable to generate random numbers every second, every tick, whatever you prefer.

    Create a "B" variable to generate random values.

    Create a Instance variable "C" on your enemies that will hold any value.

    For each enemy you spawn, set it's stance variable "C" to the value of the variable B.

    Then every tick, or every second, or whatever you prefer, compare the values of "C" for each enemy in game. And then set a command to whenever "C" has the same value of "A" simulate the enemy's jump.

  • Here friend, see if this helps: https://dl.dropboxusercontent.com/u/183 ... 20Box.capx

  • I saw a tutorial about it once. I think you can find it easily too.

    But anyway, the easiest way to do that in my opinion is to put at the block the platformer behavior, set it speed to be less than then player's speed, disable the default commands so the player can control the main char but the block itself, then anytime the player collides with the block you simulate the block to move the same direction as the player.

    The collision will be more smooth if you create invisible objects around the box to be pushed for the player to collide with.

    I don't know if I'm being clear enough, but give this a though and try and play a little, and if you still don't manage to do it come back here

  • There are two ways I can think of.

    You can compare the X of the enemy every time the enemy leaves the layout, and then depending where it is you change it's direction.

    Or, I don't know if this is the best way to do it, but this is how I do it, you can create invisible sprites that doesn't interfere with the game, and then you set the enemy to change directions every time it collides with the invisible object.

  • Several ways to do it.

    You could use two variables, a variable for the monster HP and one variable to keep track what level your player is. And then you set the value of the monster HP related to the number of the variable keeping track of the level.

    Or, you create a bunch of different variables with the HP of different monster.

    Or, you create a instance variable inside your Monster object and then you set the value of this variable to the amount of HP you want your monster to have.

    Each way applies better depending on what exactly you want to do.