I need a condition that means platform object (player) is on top of a SPECIFIC INSTANCE of jumpthru object to make the player follow the angle of the jumpthru object.
There are MULTIPLE instances of the jumpthru object, each with DIFFERENT angles so I really need the condition that means player is stepping on a specific instance.
I only need the condition, I already know the action.
Already tried these (one at a time)
platform: is on floor
Any ideas I can try? Thanks in advance.
You can use a detector object. Make an invisible sprite, positioned above/on the platform. Then it's a matter of 'overlapping' and some instance variable providing the data you are looking for.
Develop games in your browser. Powerful, performant & highly capable.
thanks. that gave me another idea to use for another concept
thanks for giving a working example. But I want to learn it not just copy the codes. Can I ask a few questions?
1. How exactly does overlapping at offset works? I read description and I don't get it?
2. this expression
^I get that Var_angle. what is dt? I don't get what dt means.
Return delta-time according to the object's own timescale. See Delta-time and framerate independence for more information.
Overlapping at offset basically takes the collision polygon of your object, moves it according to the offset, and then checks for overlap.
With is you can check whether you're on top of a platform by moving the collision polygon down, causing overlap only if an object is beneath you.
deltatime is used to make operations framerate independant. To assure you check for collisions every 20ms, instead of every frame, which may vary (and miss collisions).