Wisdoms's Forum Posts

  • So let's a walking animation has two stages, left leg movement and right left movement

    I want the player when they press [Right Arrow or Left Arrow] the character initiates left or right leg only movement until they press the key again, or if they are holding the key down the animation moves seamlessly.

    Also there will be 2 idle animations for each leg movement for when the player stops.

    There was a really old 2d retro game that had these realistic running animations, can't remember the name though. The controls were sure kinda clunky but I'd like to maybe recreate this if possible.

  • Glad you got it working. I'm curious though, what were you trying to use it for?

  • WisdomsYes!!! Thank you so much!!! I'll try to keep it updated in case other users are looking for it in the future. Thanks again!!

    You're welcome. Hope it serves you well.

  • Sorry for the late reply, I don't go on the forums too often.

    I believe this is what you're looking for?

  • Finally got around to finding a decent solution to this.

    To do the jump I have it squish horizontally as if it was a muscle. I works pretty well as it jumps only if on the ground.

    https://www.dropbox.com/s/5ao27efbsdox8bm/jello_no3rdParty_keyboard2.capx?dl=1

    Sorry, I haven't been active on the forums for the last couple of weeks couldn't reply in time.

    This works perfectly for the intention, thank you a lot I appreciate the time and effort you put into helping out.

  • One idea for the jumping would be to relax the spring forces momentarily then make the spring forces stiffer for a bit. But I guess there may be other ideas.

    Making other shapes should be possible, but it just would take more setup. All the rest lengths of the edges, and all the rest areas of the triangles. The other issue is while a grid is easy to texture with distort meshes, other shapes could be trickier.

    I was able to achieve this by just applying some force upwards when releasing the down key but the issue here is that the object jumps too when in air, not sure yet how to lock it down to only jump when it's on the floor.

    Here's the edited capx: dropbox.com/s/a1qj29x8ix2k17t/jello_paster%20%28edited%29.capx

  • Link now fixed. Guess I need to verify the links I’m copying from Dropbox. That’s been happening a lot lately.

    Thank you for the kind help, it works great for the intended effect :)

    I'm now trying to make a jump mechanic while the object is touching the floor, and also make the object rounded or blob-like.

  • Here is a test of keyboard controls. It involves two steps:

    1. find the minimum and maximum y of all the points.

    2. apply an acceleration to the points while a key is down. It uses the previous ymin,ymax to apply more acceleration to the top points than the bottom points. This causes the object to roll.

    The formula used is: 800*mdt*((self.Y-ymax)/(ymin-ymax))^10

    (self.Y-ymax)/(ymin-ymax) gives a value from 0 to 1 for each point. The top points will have a value of 1 and the bottom have a value of 0. It's changes linerarly for the points in between. I added the ^10 to give it a steeper curve. Basically with that the points at the top will still have a value of 1 but more of the points below will have a value closer to 0.

    The 800 is the force, and mdt is the timestep.

    Can be read as a force of 800 is applied to the top of the blob. The force bleeds to some of the points close to the top but most of the low points will barely have any force.

    I only did it for the plain c2 version but it should be simple enough to add the the others. Events 7-12.

    https://www.dropbox.com/s/82wzrtp796gjbnj/twoInstances_sameTypeOrFamily.capx?dl=1

    Thanks for the assistance, but I think the link is for the wrong file. Anyway I will try this as soon as I have the chance!

  • Sure, the physics is a position based dynamics simulation, so you just need to move the points.

    left is pressed

    — p: set x to self.x-100/60

    Just put that event towards the top of the event sheet. That would move it left at 100pixels per second at 60fps.

    But we can probably do better. Instead of moving all the points we could move the top ones more than the bottom ones, which would let it roll.

    Var ymin=0

    Var ymax=0

    For each p

    — set ymin to loopindex?min(ymin,p.y):p.y

    — set ymax to loopindex?max(ymax,p.y):p.y

    Left is pressed

    — p: set x to self.x-(self.y-ymax)/(ymin-ymax)*200/60

    That should move the top points more than the bottom ones. Might need to change the 200 if it doesn’t move it enough to roll.

    Thanks for the swift reply, as always. But unfortunately I can't get it working properly, I assume you mean to set the condition if left key is "held" not pressed, well I did that 'cause the press condition doesn't really move the object at all, and well the result is a lot of jank, as soon as I let go of the key, the object returns to its previous location, given that it of course moves at all

    Would appreciate if you had the time to demonstrate a proper working solution, or a physics based simulation if possible. Appreciate your help.

  • Pretty cool I can see this being used for a game like Mutant Blobs Attack or something, any way to make the "blob" thing move with WASD?

  • Pretty late, but I think this might be it.

  • Over this past year I've been browsing the different forums of Construct 2, be it here or the various Russian forums that exist and I've collected some cool and useful Capx files from different users, also I've tried my best to download all the possible downloadable plugins for the program.

    The package contains over 500 effects, 2000 capx files, and 700 plugins & behaviors.

    I thought this might be useful to some people here who still use the program, and even help them expand their creative horizons.

    Download link

    To install this package just copy the exporters and effects folders into your Construct 2 folder.

    Of course this goes without saying, download at your OWN risk!

  • Ahh! That's brilliant. I'm just having trouble getting the line of sight to detect which index the tileset is on.

    You could always do it with just tiles or sprites, you would have about 3 layers of the map, one for the darkest tiles, one for the mid-light ones, and a third for the ones that are completely in the light, and then have multiple circles that are different sizes from each other and with the blend modes have them reveal each layer of the tilemap.

    I have been meaning to try this method for a while now but haven't got around to do it, if you try it and it works please do tell!

    Good luck.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not sure where I should post this.

    Is there a way to effectively transfer event sheets from C3 to C2?

    I ask so because I mainly use C2 and I've seen really useful templates in C3 that I would like to use in C2, so is there a way to do this without recreating it completely?