When i first programmed the collisions with the enemies, it worked exactly how I wanted. But, it recently derailed and now it is fixed on (-)5 and not (-)10 . I thought it could be about the speed limits i put but all of them are (-)10 or above. I changed the values on the collision but it still fixed on (-)5. I checked if i put anything on obj_enemy but it's blank. I don't know where i messed up and, no matter how many times i read the code, it always seems it is correct.
the positive collision with the object works, but the horizontal is halfed
[vspd is vertical speed, hspd is horizontal speed, time is to check if the character is flying]
Besides that, i have a air dash, boost, float and flying mechanics that make the character lose its collision with the enemy's, but still makes it take damage. Do i have to put the mechanics variable in front of every "If"?
Code:
if vspd < 0 and time = false
{
vspd = +10
}
else
{
if hspd > 0
{
hspd = - 10
}
else
{
hspd = + 10
}
}
}
[vspd is vertical speed, hspd is horizontal speed, time is to check if the character is flying]
Besides that, i have a air dash, boost, float and flying mechanics that make the character lose its collision with the enemy's, but still makes it take damage. Do i have to put the mechanics variable in front of every "If"?