brainwavecreations's Forum Posts

  • Woot, right on! Congrats maordany on finding a solution, it always feels good to figure out any type of quirky issue :)

  • Good catch lennaert. That's gotta be it. I didn't look over at the Project/Object Tree. I'm still waking up over here XD

    Turn that object Non Visible in the left side, and it'll not show. EDIT: Or just push it to the bottom of the Z Order if you want it visible but hidden in the background for any reason.

  • That's a strange one. I've seen this happen with tiled backgrounds, that have a pixel of padding on the top/bottom. But, never across everything in the layout like this.

    There is no invisible sprites or anything running across the entire area, that might be causing it?

    EDIT: Now that I'm looking it over a second time. It looks like something about the top of your grass image. The background on that Sprite is completely transparent right? No padding, or pixel width line right at the top in the Animations Editor? Could try just cutting it shorter, so there is less space above the actual grass tips. To me it looks like something about that Sprite Object.

  • The reason is likely a different collision polygon or origin point position in the "attack" animation. When animation is changed, the polygon appears slightly overlapping the JumpThru platform, and the enemy falls through it.

    The solution is to make sure all origin points and polygons are the same in all animations. Or use an invisible base sprite with platform behavior, and pin the enemy sprite with animations to it.

    I triple checked this, but I think you are absolutely right. I'll definitely look it over again tomorrow. It was working fine before, but I was also playing the animation directly, and not using the Family Object. So now it's checking the instance of the family, and changing a state variable, which then plays the animation associated with it. Which is essentially doing the same thing but in a very different way.

    I could definitely do a square or rectangle base sprite like I do for the Player, and disable collisions on the animated sprites. I was thinking about doing just that originally, but for some reason decided against it. I think I'll go that route honestly, as it will be far faster than looking over all the frames of every animation of every enemy. I cropped all the animation frames, so there definitely is variance even when applying point/box to all the frames.. The Origin Point or Collision Box must be jumping just enough to put it in the platforms.

    Thank You so much for your response. It really got me on track, and it's going to save a ton of time. Enjoy your Friday/Weekend :)

  • Having a bit of a strange issue. The second I change any instance of my Enemy Family's State to Attack, which also sets the Animation to be the one named Attack. They fall through all JumpThru Platforms while it's playing the animation, but not Solid Platforms.

    I've tested it out with other States and their corresponding Animations for the other Enemy States that are possible. It happens with them all. Doesn't matter if they are changing over to Attack, Death, or TakingDamage. They fall through the JumpThru's and land on top of the Solid Platform at the bottom of the layout.

    It was working fine in the original project, which was setting up the actions for each enemy, rather than working with them all as a Family Object. Turning it into a huge Event Sheet. I've double checked their collision boxes and Origin Points are staying to where they were set before moving them into a Family with a State Machine.

    If anyone has encountered this before, or has any ideas off the top of their head. I'd appreciate anything helpful. If you took the time to read this. Thank You :)

    EDIT: For the time being, I'm setting the Enemy Family member's Gravity value to 0. Then just switch them back to their Walking State, once they lose their Line of Sight. But, I'm sure there is a better way to do this? Or some other reason for the strangeness?

  • Wow.... I must be tired. All I was missing was another condition in the bottom Event in the Melee Attack Group. The one making sure that the PlatformEnemiesState is not equal to "Taking Damage". I just needed to add the PlatformEnemiesState is not equal to "Attack" as well... I just came back here, to study the screenshot I uploaded. And, spotted the error... It was constantly setting the state to Walking, and the Attack state didn't have any chance to become active.

    Carry on! Maybe someone will learn from this. As always, if anyone has any advice on how to better do certain things on the Event Sheet here. Feel free to share some pointers :). I always enjoy some advice. As much as I enjoy providing it.

    While I'm at it. Here is my entire Event Sheet so far: https://i.ibb.co/SybSLr9/Event-Sheet.png . Feel free to snoop around.

    Peace, and Good Night

  • Hey all.

    I've been rebuilding a game I made for the Ludum Dare challenge a few weeks back. I've been optimizing, and as such have begun using Families for my Enemies. So I don't need to make the same blocks in the Event Sheet for each enemy type as I was before.

    I got their movement to work just fine, but setting up proper collision to turn each one around, when it collides with an object setup on every platform at the start of the layout.

    I'm moving onto the combat system, and I'm having some trouble changing the Enemies' State over to "Attack", which should play an animation with the same exact name. I'm not sure what I'm doing wrong. So before I get to far, I figured I would come here and ask for help.

    I do apologize if this has already been answered, I've been searching the forums here, and Google for a while. I also read the documentation on the Families Object. Also, checked out the Families example in Construct. Not sure what I am doing wrong in this case.

    As you can see in the "Enemy Setup", I am creating some debug text above each enemy to see if the State changes over to Attack. And, so far no good. Under the "Platform Enemy Attacks > Melee Attack" Group, you can see my attempt at switching the enemies state to Attack, when it is in line of sight. While also making sure it faces the Player by checking the PlayerBox's X coordinate.

    So far the mirroring of each enemy is working properly, based on if it is within LoS of the player or not. But, it never changes over to the "Attack" state. As you can see I tried it in the sub events. Then tested setting it to Attack right next to the condition for "Has LineOfSight". Then setup a whole new conditional block, to check if in Attack State to set the animation manually.

    EDIT: I meant to mention, that it seems like the enemy gets ready to attack. It shows the first frame of their Attack Animation, and mirror appropriately to face the Player, but do not stop and play the animation. They were doing just that, when I had them each setup individually, and not within a Family Object.

    The screenshot of my Event Sheet is large, so I've linked to it here: https://i.ibb.co/dDWLwxk/screencapture-editor-construct-net-r292-2022-04-27-22-26-44.png

    If anyone notices what I'm doing wrong here, and has some time to lend some help. I'd greatly appreciate it :) I have a feeling I need to do a similar "For Each" Condition, like I did for creating the debug text object "txt_EnemiesState" over each enemy in the family. I'm assuming I would need a similar check to see which Enemy to change to the Attack State? I remember reading or watching something a while back. Something about generating UIDs using a For Each on a Family, then taking proper action based on the UID. Not sure if that's required in this instance. I'm a complete newb when it comes to the Family Structure within Construct.

    Or maybe it is something entirely different, staring me right in the face.

    I hope everyone is having a fantastic day/night!

    Thanks in advance! Take care :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Good to know IKnowMyStory. Thanks for sharing your findings :)

    I've only ever used browsers built on chromium, and now purely stick to Google Chrome when using Construct 3. Even more reason for me to not bother with other web browsers XD

    I wonder why those browsers in particular would corrupt the c3p which was saved in an older version of Construct. I know you cannot open up c3p files saved in an older version of C3, comparatively to what it was last saved in.

    But, I think you can still get around this, by making some alterations to the project's files. Or, maybe that was only Construct 2 *shrug*. I've yet to need to revert a C3 project, so I don't know yet.

  • Huh? Did you save the projects locally, or to a cloud service like Google Drive?

    You would load it from whatever location you've saved it to. Whether locally or uploading online. If it was saved locally you need to transfer them over to the new computer.

  • Could be an issue of using "Every Tick" somewhere? If the refresh rate is different on the phone display than the refresh rate the game was developed on. Causing games to respond oddly if not calculating certain things with delta time in mind.

  • Hey there, that's how most of the behaviors working with vectors work in C2 and C3, it can be used in useful ways as well, for example, you can prepare your Vector X and Y values early and then enable the behavior when needed, it will apply immediately the previously set values

    Excellent to know! Thank you so much for your input :). Now you've got my gears turning, for other projects and gameplay mechanics. I'll be dreaming about Vector X and Y tonight XD

    EDIT: Right now, imagining a grappling hook that grabs a point then launches the player up in the air like a rubber band.

  • Haha that 'feeling dumb' is the best! I'm a card-carrying member of that club... I tell myself it means we're learning :)

    The playground experiments are a good habit! It's a good way to get a handle on a behaviour, and really helpful if you do in fact catch a bug and need to report it.

    I'm looking forward to your project - keep at it!

    Thanks so much! I feel the same way :). I had to rest my eyes for a bit earlier today, for a breather. While resting, I reminded myself that I am still learning, and each day is still progression no matter how much I get done. The finish line is never reached, only moved forward more and more.

    I tend to pack more on my to-do list than I can ever get done each day. But, whatever I get done, produces more knowledge I can store and recall for later use. Nothing like a good challenge!

    Like they say, we learn the most from failures. It's only a failure if you haven't learned from it, and progressed forward. Edison is quoted as saying something along the lines of, "We Now Know 1,000 Ways Not To Invent A Light Bulb". Without those 1,000 failures we would be without light.

    Best of luck on all of your projects, and endeavors as well! It's always nice to find a kind soul in communities like this one :). I hope you have a great day/night, whatever time of day it may be in your area.

  • Hey brushfe, and thank you for your response :)

    Yeah, that's exactly right. So if I was jumping up and to the right, then entered the Edge Grab State. Then, pressed down to enter the Falling State, it would jump up and to the right before dropping.

    Same goes for the other way around. So up and to the left. Setting the Vector X & Y to 0, helped the falling into Edge Grab State as well. For days, I was confused as to why sometimes the Player Object would fall at it's normal speed, and other times would fall much faster. It was because I was falling downwards into the Edge Grab trigger object. Then when pressing S or Down, it was adding the previous Vector Y to the Falling Speed.

    I was just wondering if this is normally the case. It's working perfectly now, that was just a couple extra Events that I needed to add to solve the issue. I just thought it was strange.

    I definitely appreciate your recommendation of creating a very basic, "Playground" if you will, with only the basic elements in the Project. I actually have one on my Google Drive called test.c3p filled with all different layouts, and groups of blocks on the Event Sheet. I add to it, to work out new gameplay mechanics, and only enable the Group in the Event Sheet that is required to test that specific gameplay element.

    I should have jumped on there, and tried to recreate the issue earlier today. I was just setting my player next to the Edge Grab trigger, and loading with each change on the Event Sheet. I'll definitely keep that in mind next time something strange I don't expect happens. To rule out anything strange that might be going on with my Actions/Events.

    Thanks for being super helpful :)

    EDIT: I will definitely keep in mind, adding more debug texts to my layouts as well. I currently have one over the Player Object for it's current State. Not sure why I didn't add one for the current Vectors. Must be one of those days, after little sleep, and out of sorts.

    EDIT 2: Just added text for the Player's current Vector X, and Vector Y to the project. Then, disabled those two Events that sets them both to a value of 0. And, there it was. The issue could have been right in front of me earlier... I feel dumb.

    Thanks again!

  • Hey everyone :)

    As always, I'm constantly learning new things everyday while using Construct 3. This was a new one for me today. It's not an issue for which I'm looking for help, which is why I am posting this under "General Discussion". I'm just curious as to if this is the normal function of Construct 3.

    Earlier this afternoon, I was working on an Edge Grab mechanic for my Player's State Machine. Oosyrag, here in the community was helpful in sorting it out.

    They recommendeded that I use the "MoveTo" behavior rather than "Pin", or "Set position"(using the lerp parameter to smooth out movement, as I was trying to do). While disabling the Platform Behavior when entering the Edge Grab State. I had tried this yesterday with no success, but took care of the gameplay issue today.

    I was having some difficulty with the drop down from the Edge Grab State. Basically, when "S" or the "Down Arrow" key is pressed the Player should simply enter the Falling state and drop in a stationary line on the Y axis.

    In my Action for the Edge Grab drop down condition, I was Re-Enabling Collisions, the Platform Behavior, Setting Player's State Variable to "Falling", then setting a timer to prevent an immediate Edge Grab after leaving that State.

    When I was trying to work it out in this fashion, the Player Object was moving upwards in the direction it was previously jumping while entering it's Edge Grab State. Sometimes this would cause the Player Object to jump up on top of the platform, rather than dropping down. Depending on the speed and height of the jump it was in when the Edge Grab was initiated.

    To fix this. All I had to do was set the "Platform vector X", and "Platform vector Y" to "0". Along with the Disabling of Collisions, and Platform Behaviour, on the Player Object.(which I already had in the Edge Grab state initially) After that, the mechanic works perfectly as intended. So, it seems that Platform Behavior's "Vector X & Y" are both stored, even after the object with the behavior has stopped moving in either direction. Such as using the MoveTo to move it to a specified X and Y coordinate, and setting Platform to Disabled.

    Apologies if my explanation is confusing. I try to note down each detail with these things.

    Is this how it's intended to be? I had thought that after Disabling the Platform Behavior, and then having the Object move and stop(like I'm doing with MoveTo). That the Platform Behavior would sort of start fresh on the Behavior once it was re-enabled. Rather than continuing along the previous Vector X & Y values.

    I really need to spend a day studying JavaScript, along with Game Math. That's becoming increasingly apparent XD

    EDITS: Changed title, and some wording.

  • Verbosity is fine, lack of detail is usually worse. In this case though it was an xy problem, where you were asking questions about your attempted solution (pin), but pin wasn't really the relevant tool to use in the first place for your situation. So unfortunately the effort you put in to describe your issue was mostly wasted.

    Duly noted

    ✌️

    Thanks again. I've got it working with MoveTo