Hi again! This is my second post, here I go.
Commands: A key, D key and Space bar key.
I'm inspiring myself on Dandara jump mechanics:
Right now my main issue is the Pointer's angle. I want obj_PlayerPointer to have it's angle automatically set to an angle that has the same angle difference to the current landing area it had in the previous landing area. Plus I want to happen as soon as obj_PlayerMover jumps (instantaneously, if possible)
I managed to get it to work as the intended way when landing on VERTICAL platforms, but couldn't do it when landing on HORIZONTALS OR DIAGONALS
How I did it so far
I created an obj_PlayerDestinyFinder that has bullet behavior enabled and set it to spawn when pressing Space Bar (along with jumping with obj_PlayerMover) and, whenever it collides with any obj_Floor instance, set angle of obj_PlayerPointer based on an specific formula (see in file).
As I said, the formula works as intended when landing on Vertical platforms, but not when landing on Horizonals or Diagonals...
I created an instance variable on obj_Floor and created different conditions to set it to "Horizontal", "Vertical" and "Diagonal" based on the angle of each particular instance...but I don't know how to "read"/"return" this instance value.
What I'm aiming to try next, but don't know how to do it in Construct!
When thinking about this, I thought that something similar would be the solution to the way I'm tackling it:
- If obj_PlayerDestinyFinder collides with an instance of obj_Floor
- Check instance variable of the instance of obj_Floor which obj_PlayerDestinyFinder collided with.
- If it's "Vertical" > set angle using "Formula A"
- If it's "Horizontal" > set angle using "Formula B"
- If it's "Diagonal" > set angle using "Formula C"
I've been trying to accomplish this during the last week, with no success. Got a little burned out, but I'm still up on my feet!