Ranch Dubois's Recent Forum Activity

  • So, I’ve turned on the Show Grid option to start building with blocks, but I can’t actually get them to snap to the grid. I have the Snap to Grid option turned on too but it always seems to snap to the middle of four grid squares. I have my grid the size I want it, so I don’t want to change it. I also have my collision tiles the same size as the grid squares, but how to I make them fit exactly into the grid squares. I got one to fit in using coordinates, but I couldn’t get a second one to snap onto the side of it.

  • 1. Calculate the average x,y of all the player positions.

    2. Set your camera position using the average position as the second parameter of the lerp.

    Then to limit the player positions to the screen you could clamp the player positions.

    So maybe something like this.

    Global number camx=320

    Global number camy=240

    Every tick

    — set camx to lerp(camx, (player1.x + player2.x)/2, 0.03)

    — set camy to lerp(camy, (player1.y + player2.y)/2, 0.03)

    —scroll to (camx, camy)

    — player1: set x to clamp(self.x, camx-320, camx+320)

    — player1: set y to clamp(self.y, camy-240, camy+240)

    — ...do the same for player2

    Notes:

    320, 240 are half the viewport size 640,480. Change as needed.

    The above does the average of two players. For three it would look like this:

    (Player1.x+player2.x+player3.x)/3

    Thanks! I asked the same to the previous person who applied, but what exactly does clamp do. I looked it up and couldn’t find much on it.

  • You would average the xy's

    (x1 + x2)/2

    (y1 + y2)/2

    In this scenario.

    Same formula for the restriction, but setting object xy's including the "clamp(value,min, max)" expression.

    Thank you! What does clamp do? I looked that up, but couldn’t find really anything on it.

  • I've educated myself and tested scirra.com/tutorials/626/making-a-smooth-following-camera which brought about the desired results with one player, however I tried using the exact same method to command the camera to lock on to Player 1 and Player 2 at the same time, which seemed to "confuse" the camera, so I need to know how to have a camera focus on four entities at one without ever zooming in or out.

    It was difficult to find something similar to what I'm talking about, but this video a little after six minutes somewhat showcases what I'm talking about.

    Furthermore, I'm making a four-player two-dimensional platformer and I want the camera made so that if one player would go as far as they could, the camera would stop them from moving more than a screen's length away from a player all the way in the back, so that no one can move out of the view of the camera. However, I do not want this camera boundary to affect other entities besides players in any way.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks. My toolbar in the image editor was too small, so I had to expand it. I wouldn't have found that without your help.

  • 15-year-old starting to put his game together here. I made my first sprite (a player sprite) with Pro Motion NG and its legs always fall through the floor. Does anyone know how to fix this problem

  • That's another very generic question, are you a beginner because I would suggest taking a look at the manual before starting something as detailed as a megaman style platformer game. In general you are looking for conditions (press C on an event) then it allows you to run something based on a variable being a certain value. An int is a number, a string is text and boolean is true/false, they can be used as conditions or 'if statements', run an event if such a value is x.

    Thanks! I think that's all that's on my mind for now and I'll be sure to look at the manual.

  • Say I wanted a boss to dig underground, effectively disappearing from the stage. Seconds later, four piles of gravel appear, one containing the boss. If the player attacks that pile, the boss takes damage, pops up, and all other piles disappear. If the boss’ pile isn’t touched, the other piles explode into bullets, two shooting either way horizontally, one shooting up, and two at 45 degree angles. After this part of the attack, the boss charges up, then creates an explosion that you have to get away from.

    Look into using instance variables. You can give the boss a 'state' variable to control what it's doing.

    boss.status = "digging" > trigger dig pattern

    wait 2 seconds

    boss.status = "underground" > trigger gravel pattern

    gravel pattern > create 4 gravel at x,y > choose gravel UID 0-3 and assign one to be the boss, at this point also assign gravel.angle for shooting later

    player attacks gravel where boss=true > boss take damage, destroy gravel

    player attacks gravel where boss =false > destroy gravel > spawn bullet at gravel.angle assigned earlier (i.e. 0 shoots to the right, 180 to the left)

    boss.status = "charging" > trigger charge attack pattern > spawn explosion

    Another example, the boss jumps around with his sword out in front of him. After five jumps, he hops to a high up part of the stage unreachable by the player and begins to throw bullets down at the player.

    Add a counter variable, every time the boss jumps add 1 to it, when it reaches 5, run the pattern for jumping to the higher stage and spawn bullets

    This was an excellent explanation. Thank you so much!

    Another confusion now: How to I link an instance variable number, string, or Boolean value to a specific action. Also, would the three different values be used for different kinds of things or actions?

  • Yes it's possible, but the question itself is too generic, 'how do I go about it'. You can use conditions or run functions that happen when something is true. If the boss hp is half then increase the damage done. To cycle attacks you just run a function which is a pattern of attacks and when that ends run another function. You can use 'choose' to set a variable randomly and pick functions to perform them in a random order.

    Thanks! That helped a lot, but I am still confused on how to make moves and I will try my best to elaborate as much as possible.

    Say I wanted a boss to dig underground, effectively disappearing from the stage. Seconds later, four piles of gravel appear, one containing the boss. If the player attacks that pile, the boss takes damage, pops up, and all other piles disappear. If the boss’ pile isn’t touched, the other piles explode into bullets, two shooting either way horizontally, one shooting up, and two at 45 degree angles. After this part of the attack, the boss charges up, then creates an explosion that you have to get away from.

    Another example, the boss jumps around with his sword out in front of him. After five jumps, he hops to a high up part of the stage unreachable by the player and begins to throw bullets down at the player.

    Where in the interface would I find where to implement these behaviors into the boss and how would I establish that the boss enemy changes between these behaviors?

  • I'll soon be leaving the planning stages of making my multiplayer two-dimensional platformer. I want it to be something along the lines of MegaMan or Shovel Knight, with the four players having the same standard grounded attack, neutral aerial attack, up aerial attack, and down aerial attack. Players would also be able to vault across the ground gaining great speed and height if they hit the ground or an enemy with the tip of their down aerial attack.

    Additionally, I'd like there to be complicated, skill based bosses whose attack patterns who have to learn. I imagine that these attack could be things like movement options that are also attacks (such as jumping forward while stabbing with a sword), different kinds of projectile attacks, and summoning menial enemies.

    I was planning that some boss' attacks may cycle and that when they reached half health, their attacks would become stronger, they would gain new attacks, and/or become more proactive with their attack patterns.

    Another example: an inkling of an idea I have is that if you jump above a boss' head and he is horizontally close to you, he'll run under you and create a windbox, blowing you into the sky and consequentially changing the boss' attack pattern.

    Would this be possible to program in Construct 3. If so, how would I go about it.

    Thank you in advance for your answers! If anything is unclear or needs to be restated for any reason, I'd be more than happy to oblige!

Ranch Dubois's avatar

Ranch Dubois

Member since 13 May, 2018

None one is following Ranch Dubois yet!

Trophy Case

  • 6-Year Club
  • Email Verified

Progress

7/44
How to earn trophies