R
Robzoid
Guest
I'm working on a 2D platformer and am in the process of converting my player object's step event from a bunch of giant, messy if statements to a state machine. I'm trying to decide if I should leave my enemy collision event as is or remove it and replace it with this:
So, in essence, I'm asking if the collision event has any advantages or differences to using place_meeting() and, if it does, which do you recommend for detecting collisions in a platformer? I'd like to keep as much of my code integrated with the switch(state) code I have in my step event. That's why I'm considering getting rid of the collision event, but I'm concerned that maybe there's something I'm not understanding that would make leaving the collision event the better approach.
Code:
if place_meeting(x, y, oEnemyParent)
state = player_state.damage;