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.