AlexSV's Forum Posts

  • This person is using a different movement behavior, but the same idea applies. Basically, you need to set tags on your sprites and then use an event to tell it to ignore the tags.

    https://www.oneminutevideotutorials.com/2021/10/20/how-to-use-solid-collision-filtering-with-tile-movement-in-construct-3/

  • Can I see a screenshot of your events?

  • Sounds like you need to write some new controls for the player!

    The first question might be "do I still want my player to be able to jump using the up arrow?". If you don't mind it, then you're all good! The above advice works just fine. Add a mouse object first!

    If you don't want the player to be able to jump with the arrow keys at all, you would select your player object and check under the properties for the "default controls" section. Turn off the default controls. Then, you will program in your new controls for jump, left, and right.

  • My method is probably kind of clunky, but I would create the shotgun with its pivot point offset behind the stock by a few pixels. Then I would use the Pin behavior to pin the shotgun to the player object.

    Then you just make the shotgun set its angle to the position of the mouse pointer x and y every tick.

    I've never created an example or published to the arcade before, so let me know if this is the correct way!

    https://www.construct.net/en/free-online-games/pivoting-weapon-example-54683/play

  • Howdy, everyone. I'm working on my first project that is heavily using 3D. The concept mirrors Jurassic Park for the SNES, which features isometric 2D movement outside of buildings and 3D classic Doom-style movement inside.

    I've looked at several examples which seem to rely on heavily repeating 3D cube shapes, which looks a bit samey. I could increase the number of cube shapes to get variety, but I always get this feeling that if I am just repeating something over and over in a program, then I am not using all of the tools available to me.

    So I did some digging and I saw a few people bending sprites with meshes in order to get interesting 3D shapes. I would still need to create individual sprites for every chunk of wall inside a building. It seems like a less efficient version of a 3D shape, honestly.

    And finally, I figured, "well, what if I could bend a tilemap? That would solve the need to create new sprites all the time. I could create the assets and then draw all of my interiors with ease!" but it seems combing a mesh with a tilemap is technically impossible.

    So... are there any methods I might be missing? Is the repeating cube truly my best option?

  • I tried out my standard method of applying solids and jump thrus, which was to decorate my level with tilemaps and then use a separate layer for all solids and jump thrus... and it works fine.

    What's this weird interaction? Has anyone had this problem but me?

  • Also, jumping while on the Jump Thru platform next to the Solid wall seems to launch you into the sky... what?

  • Hey there, everyone. I'm seeing some weird interactions in a game I am making full of inside jokes for my friend as a wedding gift.

    So basically, I have a tilemap for the stage solids, and a tilemap for the jump thru platforms and decor objects.

    However, what I am seeing is that Jump Thru behavior tiles are acting really weirdly next to Solid tiles. For one, a Jump Thru will collide when it isn't next to a Solid wall, and the player will be able to walk on that Jump Thru tile if you walk along the surface to another Jump Thru near a wall. However, if you fall down from above, the player falls right through, even though that very same tile collided a moment ago.

    Also, it seems like a player on top of a Jump Thru tile isn't considered to be on the floor, since my code checks if the player isn't moving and is also on the floor in order to play the idle animation. When standing on a Jump Thru platform that is also next to a Solid wall, the walking animation never stops.

    My file can be downloaded here. The issue in question is on the Desert level. I have changed the blending mode on the "decor" tilemap to make them black and show which is which.

  • That was something that I was concerned about to start with: all these examples create cone-shaped lights rather than straight beams. I suppose I could sort of add invisible "blinders" to block the ray into a straight line....

    I feel like I want the beam firer to remain still while shooting for the sake of fairness. However, If I can figure out how to update the beam, then I'll give it a shot.

  • I'm not totally new to C3, but I'm learning new things every day. Let me see if I can sort of piece together the idea.

    So the concept that I believe I am reading isis that the drawing canvas is what will visually and physically represent the beam, and we are using line of sight to use raycasting in order to figure out what the shape of that beam that we are drawing into the drawing canvas will be, right?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Very nice! Glad I could help out a little bit. I completely forgot about For Each, haha.

  • I know that the way you have the code set up isn't picking things correctly.

    Like, if you had a player sprite and a block sprite, and when the player touches any block, it destroys the block. It doesn't destroy ALL the blocks, just the one you touch. That's because when you have the event "When Player collides with Block" it picks the specific player that touches the specific block. That's why only that block is destroyed.

    So notice that your code says "if any characters have a line of sight to any characters" essentially. You need to add another condition that weeds out stuff that you don't want.

  • Hey there, I'm conceptualizing a hide-and-seek sort of game where It obliterates other players with a massive laser beam.

    The issue I am having is that I have literally no idea how to build the laser the way that I want. I want the beam to be blocked by anything that isn't a player's body, essentially. Or even maybe blocked by a player: hide behind a corpse to shelter yourself from the laser.

    Point is, I want the beam to be blocked by solids, but have portions of the beam continue. Here's a simple concept drawing.

    I was considering... would it be possible to use, like... a tilemap? Like a tilemap of many 1x1 squares? It doesn't seem very practical but... I dunno, that's all I could think of. Or maybe using a shadow caster somehow...

  • I'm not nearly as technical as some of the other users on the forum, but the first thing that popped into my head was an instance variable. I feel like this is already a part of the engine though. Don't sprites automatically get an object idea on creation?

    As you create instances of these little guys, you have a number instance variable that increases for each instance. So the first character has ID = 1, the second character has ID = 2, and so on.

    Then, you do a check using a comparison. If Self.ID =/= Character.ID, maybe that would work? I haven't tested this but I'm just tossing out ideas.

  • Hi there, everyone.

    I am programming a dice roll into a function that does exploding dice on 10s and critical failures on 1s.

    I am currently "using int(random(1,11))", since random picks a value one less than the second number, this should roll between 1 and 10.

    However, I suspect that these numbers are skewed against 1s and 10s because of int. Int rounds to the nearest integer, so when I roll my random value, a 2 would trigger on a value between 1.5 and 2.49, right? That also means that a 1 can only trigger from 1 to 1.49 and a 10 only on 9.5 to 10, reducing the probability of those numbers by half.

    Doesn't that mean that I should use "int(random(0.5,11.5))" in order to let 1s roll on 0.5 to 1.49 and tens to roll on 9.5 and 10.49?

    Tagged: