How do I fix my enemy collision mechanic?

How do I fix my enemy collision mechanic?

I am working on a platformer game and i added my first enemy and have already coded in that he is supposed to flip when the checker point detects a wall

However he just continuously slams into the wall instead. Does anyone know what to do? I searched in the forum for a bit but i haven’t found anything helpfull.

The object starts to constantly flip to the right and left.
In the sub-events, use the “Trigger once” condition

Put all these into object group called Walls and now you will need only ONE condition to check if checker point is inside Walls

Now give your enemies boolean variable
And do this

And in your logic you go with
Condition
Enemy point checker is inside Walls

Action
Toggle enemy variable GoingLeft

it still does not work.

When you do what you want and not what i told you to do it never gonna work

@ZeroX4, you have a screen shot for part of the instruction, and with a bunch of text for another part of the instruction. Consistency helps with understanding.


That’s because you are changing a scene variable in the action, when you need to change an object variable:


To change this to an object variable, click on “Add action”, select Enemy, choose “Change object variable value” and then the variable to change:

I absolutely agree
That is why i cannot fathom why you are more willing to point it out to me
Rather than applying it to yourself

I have no idea what you’re on about here. And I have no idea what that screen snip is about. And that’s my point - you give a screen shot, with no reference to what it is we should take note of.

I’ve seen other posts where you are really good with the explanation, highlighting parts in the screen snip so the OP understands, so I am well aware that you can and do explain. It’s just missing in this thread.

I left as much info as i decided is necessary cause i had other things to do
If something would be unclear for OP i would have no problem showing him exact solution after i tested it out myself when i had time
And its the same way you are often doing it without any1 pointing out to you anything about consistency you lack

So let’s look

In my eyes i explained exactly what needed to be explained where only thing that is missing is the fact that point check logic require for each object
Which i was unaware at the time i was writing my reply
But that is something any other user could help with or i could simply test it later and add that it will require for each object event

So let’s look at your reply

You start with " That’s because you are changing a scene variable in the action, when you need to change an object variable:"
No that is not
I mean not only
Its also because OP is checking at the same time if point is in multiple objects without OR or without just using group

You just provided answer focusing only on one issue and not looking for any other possible issues
You point out to me consistency helps yet you lack to be consistent yourself?
That’s hypocritical

MrMen you know me for over 4 years and i hope i don’t need to tell you i am here thx to you and that i like and respect you

I just grew sick of ppl acting polite and smart when in reality they are stupid idiots

Telling me i should do this or not do that when they are doing or not doing exact same thing

I KNOW you are not one of them i know you are reasonable and honest person
But i promised myself i will make no exceptions for any1 and i gonna apply exact same logic ppl try to apply to me just like i did with your message above

Heh, I’ve just clicked - I totally missed the multiple conditions in OPs screen shot (I’ll blame lack of sleep lately).

I think you’re misunderstanding me a bit, and this is blowing out of proportion. This’ll be my last mention of it in this thread.


@poraj, the other issue is that the 5 conditions all have to be met before the variable is changed. This will never happen - the enemy’s checking point will never be in instances of those 5 objects at the same time (unless they’re all overlapping).

You either need to do what @ZeroX4 wrote and put them all in an object group and check on that group:

Or you need to put them all into an OR condition:

And good cause i am more than sure we don’t need to discuss this any further

I just want to you to look at one thing i notice
You now justify yourself with lack of sleep

So you was tired enough to not look are you consistent in how you provide help
But not that tired to point out how someone else is providing help and if its consistent?

Imagine me now next time you tell someone to use repeat for each
Pointing out to you you did not explain how to get repeat for each in events

Again that is not something we need to discuss i just want you to look objectively at what i wrote in this message