Alon's Forum Posts

  • Couldn't this just be a single event? When player attacks, disable platform behaviour, wait for 'timer', enable platform behaviour.

    Yes it is, but since my code for the all thing was a complex overall I guess there are clashes so I re-make the all thing again trying to keep it even more organized as I learn.

    That made sense to me on my first attempt, but from what I remember the last time I used disable platform behaviour, my player fall from the floor (solid)... so I skipped that idea and used disable/enable groups.

    Maybe I don't use the disable platform behaviour correct?

  • Thanks for the reply!

    Since I'm still a newbie, I didn't use Functions yet (I know I should, cleaner, re-use etc...)

    My movement is lock and unlocked based on a "on" and "off" (string) like Boolean but I like see it on the event sheet better. it's very much like what you described.

    For cooldown, which isn't the issue in my current major bug, first I did an old fashion cooldown with few lines and variable but then I realized... it's much simple to do with the Timer behavior and it works nice (for now, I didn't mess with it much to ran into issues, so maybe I'll change my mind).

    For now, once again... I'm re-code the all thing from scratch, I know it sounds stupid but it's a good practice for me to learn Construct 3.

    I hope that I will find a different / better approach to make the "freeze while attack" without getting my Player stuck randomly again.

  • Hello All,

    I will do my best to explain what I did so maybe you can help me find a different solution for my issue.

    Just to be clear: (you can skip this part)

    Since I'm still a newbie who got lots more to learn in Construct 3, After working on my base-engine game focus on the Player mechanics I had so many issues and bugs that I've decided to Re-Code everything with much more organized way.

    So I made dedicated event sheet for the Player and one for the Enemies, I've created groups, comments and even an ON-SCREEN colorful Debug-Text that is really to-the-point for me to follow and test (I know that there is a wonderful debug-mode on C3, but it was hard for me to follow it) ANYWAY! everything is nice and easier compare to my first attempt of the code for my game and I learned new things on the way, good practice.

    So far so good, now... for THE ISSUES:

    I'm pretty sure that I code the all thing wrong and I need a different approach on how to do it:

    The instance (text) variable: "Movement" is set to "unlock" when the player is moving, jumping, etc..

    But when the Player Attacks it will set to "locked!" which will deactivated the INPUT-CONTROLS group and then activated.

    What it does basically is: when the Player attacks while in ANY movement, walking on floor / not on floor while jump, falling, he will stop moving even if you hold the right, left, jump, he stops on mid air or on the floor, do the attack and when the attack animation is done he can keep walking.

    This short example is just a RANDOM time when the player attacks and stuck, It's not happen just when he fall or jump, it could randomly happen just when he attacks on the floor as well:

    That "Movement" instance variable is obviously where the bug is, but I'm sure it's also the wrong way of do the all freeze-player after each attack while moving.

    That's the mechanics I want to make for my game, I know it will be easier to do without it... especially as a newbie but it FEELS exactly as I imagined it on my simple brain.

    The thing is... it's working!

    kind of, because I have a bug that sometimes randomly it will keep the Player on "locked!" which will freezes my Player. it's obviously related to that "MOVEMENT" instance variable I created and it's all over the place on my code, on any move as I explained so I can get rid of it and should find a different approach instead.

    I know it will be impossible help me fix the bug without sharing my capx, the reason I'm not sharing it is because my goal is to make it my official game, I hope that you understand.

    I'm not interested trying to FIX this bug because I already tried and my brain can't figure it out, I hope that you can still help me find a DIFFERENT WAY to code such thing.

    Maybe there is a more simple way? maybe even using some extra Plugin as a shortcut?

    Thanks ahead and sorry about my bad English.

  • Alon,

    please upload your capx so that we can improve it much faster.

    Drago_18 ReillyRobbie and everybody else who wants to help

    I made a much more simple base experimental file from scratch so you can play with and maybe help me out to make a smooth Push / Knock Back for the Player.

    I did my best to keep everything very clean and organized but please remember, I'm a noob so I may code things in the wrong way. I hope it's still possible to work with.

    I disabled some code I didn't use or finish so please ignore it.

    What you'll see for the Push / Knock Back I did so far was OVER complicated, I'm sure it can be done in a much simple way but again, I'm just a noob.

    You'll notice that I barely use variables at all, I think it can be done in many other ways so I kept room for you to play with it.

    So if any of YOU can do the same "idea" for a smoother result with or without "Move To" Behaviour by REX, it will be really great to share here so me and others can see what you did and how clean it is compare to my MESS... (sorry for the ugly simple graphics as well, I made it fast for sake the of experiment).

    Thanks ahead for anyone who helps in this, I'm curious to see your ways.

    My Experimental .capx for download:

    https://goo.gl/e1x8FS

  • Update:

    I'm trying to mess with it but still, I get the same weird results I described above when I tried the Vector X.

    I'm pretty sure that I over-do the code while it's probably could be much simple to accomplish.

    it's probably because I'm still learning Construct as I experiment.

    If anyone can make an example capx of with or without the "Move To" behaviour:

    (the cleanest shortest code, the better)

    • Push-Back the enemy
    • After the Enemy pushed and stopped, Enemy Waits for 0.25 seconds
    • Then the Enemy continue walking to Right or Left (could use Choose I guess) but he must be mirrored.

    Thanks ahead for any help!

  • Thank you so much!

    I should try use it and probably some other REX Addons for C3 may make things easier!

  • Hello All,

    So I'm working on my basic Platformer (my very first game in Construct 3 as I'm learning).

    I'll try to explain what I did so maybe you can help me out here.

    This is what I got for the Player:

    I used a Box as the actual Player with the Platform behaviour

    The Animated Sprite is attached to this Player Collision Box with all animations:

    Idle, walk, jump, punch (attack) so far everything works great!

    For the Enemy:

    Platform behaviour, walks Right & Left and Mirror for the right direction when collide with the wall (solid).

    For the Player Attack I made this:

    • When pressing the 'SPACE' key, The player play the "Attack" animation.
    • Player create a Red-Box (invisible collision, plays for 2 frames real fast).
    • When the Red-Box collision with the Enemy, the Red-Box destroyed and this is where the Push Back should happen!

    PUSH BACK:

    This is what I did in general, I used 2 ways:

    1

    - I used vector X and Y (for how far and how high the enemy will push back)

    it worked PERFECT before I added movement (platform) for the enemy.

    As soon as I added the Platform movement (playing with the properties, speed and acceleration) I had weird results... bad distance, mirroring and more randomness.

    2

    - I wanted to try different SIMPLE way, I added a Bullet Behaviour so it will be enabled for 0.2 seconds and Disable itself, but it wasn't act smooth as the Vector X way and also it acted weird and random the mirroring.

    Considering I'm still a newbie in Construct and learning, I tried these ways but I still have much more to learn.

    Now... forget about my "ways" of what I did for the push back.

    What do YOU recommend for a smooth looking push back for enemy?

    The most important for me is that the Enemy will push back from the opposite side of the punch (player.X)

    I believe that either Vector X or Bullet (enable/disable) are the solutions BUT do you have other idea or something you already did before and you can share with me?

    I'm not even sure if I'll understand, so if you have a video tutorial or example to share it will be great visual for me to explore it.

    Thanks ahead! and sorry about my bad English.

    Early example of my noob-journey.

  • Thanks for the tip, I wasn't sure about the differences. it's good to know.

  • UPDATE:

    (problem solved)

    I re-made the same idea from scratch on a new project and during the process I found out what I did wrong.

    It seems like as the code got more complex I had clashes on the Mirror of both the original Collider-Box for the player and it's Animation Sprite, so the creation of the Attack RED-BOX spawn got messed up.

    I shared this in case any other newbie may ran to this issue in the future, I hope it helps.

  • Hello All,

    I'm trying to make something that supposed to be simple, consider I'm new to Construct 3 and can only learn it here-and-there on my spare time... newbie in other words.

    My character's animations sprite is pinned to a GREEN BOX which is the collision and platform behaviour for my character, the reason is because I may change the animations sprites in the future or during the game.

    so far so good and simple, right?

    Pressing "SPACE" should spawn an attack RED-BOX as fast animation then destroy itself, and it works fine.

    BUT! when I try to mirror it based on the GREEN-BOX (my actual player controls) it's ignoring the Mirror condition for the -X.

    and if I do the SAME code but replace the GREEN-BOX with my Animated-Sprite it works...

    It is important for me that the Attack RED-BOX spawn will be based on the GREEN-BOX and not the animated sprite, any idea what I'm doing wrong or how to fix it?

    * Ignore the disable parts on the screenshot, I tried stuff but which looked like origin issue, nevermind that.

    Screenshot with my Attempts:

    https://image.ibb.co/hLS1oc/Construct3_Issue_1b.png

    Sorry about my bad English and Thanks ahead!

  • WOW! faulknermano Thank you so much!

    This is very helpful, I just had a rough look at it while my basic file is open so I can reply to you and thank you but I will check it out more deeply for sure!

    Thanks to your detailed post I FOUND AND FIXED THE ISSUE!

    On my pathfinding behaviour properties I change the Rotate Speed from 135 to 2000 and now there is no delay! as soon as I click no matter where, it works like a charm!

    I'm guessing even that I'm not using Rotate object (disable) it's still calculating it slow on the background before it start moving, so the fast speed makes it work as I wanted.

    I will also try your many other advices such as the circle / ellipse collider for the player, make more sense and smoother than a cubic shape of course.

    Also, I hope to understand what you've done on the event sheet, not that I'm doing a copy past but I will try by my own first because I'm still learning.

    I may have more questions later on, but for now I'll just have a look and do some basic tests.

    Once again

    THANK YOU

    for taking the time to make this post, it will help many other users on the community for sure!

    Keep up the good job and have a wonderful day.

  • Thanks for sharing this information joelmayer I appreciate it and I'll check out!

    Unfortunately, as you can see on my latest post I'm stuck on a very basic issue, not even on the scaling part which I'm not even sure I'll use or not.

    It's like the response is delay even that my layout is empty without any obstacles, only 1 sprite and I'm not sure what I do wrong as I explained.

    Maybe you can have a look and find out what I did wrong or how can I fix it?

  • Here is my first attempt for a minimalistic Point & Click movement using the pathfinding behaviour.

    Download Construct 3 (c3p) file here: https://ufile.io/k6exh

    As you can see there are no obstacles, only one sprite as the base mask for the character animation I may pin later on.

    The very first MOUSE CLICK works fast, no delaying at all.

    But from the 2nd click anywhere on the screen it takes some time, only then moves to the point.

    There is nothing much to calculate so I'm pretty sure I'm doing something wrong either on the behaviour properties or on the event sheet.

    I'll be happy if faulknermano or anybody else can have a look and tell me what I'm doing wrong?

    Thanks ahead!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • >

    >

    > Any other suggestions instead of the built-in pathfinding behaviour since it's very slow calculating and not reacting right away? please share your ideas / suggestions / examples will be great since I'm still a newbie user.

    >

    Alon, I've used pathfinding on a point-and-click type prototype before and there is no real lag for me unless I keep on regenerating my obstacles, which would not be commonly done so much in that type of game.

    I think you can use pathfinding. If you have lag issues with a certain pathfinding setup, then the best way is to show others how you've set it up by uploading the capx so we can determine if there's some thing that can be optimised/improved.

    Nice! First of all your demo is really cool, great job!

    Will you be kind and share the settings or maybe some events of how you make your character to go as soon as I click on the stage / map?

    In my very first attempt, I didn't touch the path-finding properties much maybe the speed acc/dec but nothing much so after checking your demo you gave me hope!

    Again, I'm new to Construct so I'm probably not understanding exactly how to set it up to react more like what you did so the player is moving without: stop for a short time, calculate... and then move...

  • Thanks, I guess the pathfinding behaviour is not good for that goal then.

    Because as I mention I'm looking for a fast-reaction solution when you click it's just working right away exactly like most good old adventure games such as Gobliins, Simon Sorcerer, King's Quest, Larry Quest etc..

    As soon as you click on a place on the map the character will go around the obstacles, bridge, trees, rocks whatever and do it immediately.

    All I can think of right now is to do it without path finding but that will be very annoying to let the player guide the character on many clicks around the map... it won't be what I'm trying to emulate.

    Any other suggestions instead of the built-in pathfinding behaviour since it's very slow calculating and not reacting right away? please share your ideas / suggestions / examples will be great since I'm still a newbie user.