Where is a operator

Where is a xposition comparison operator according to YouTube video there should be but i can’t find it

An operator is a logical-math sign like this

or even >, =, < and many more, basically they are symbols that do something to the adjacent values or variables

For you here is an operator
image
BUT… I think you typed x pos comparison, I assume that you need to compare values and to do it
you need to compare on the condition side not action side

2 Likes

i am trying make my the player sprite change direction based on the gun direction do you need my code to know what mean the gun folliow the cursor

The way GDevelop events work is the left column in the editor is for conditions, and the right is for the actions.

Conditions are the “If this happens” or “if this is true” check of the event.
The actions are the doing part that make the changes.

To do what you’re after, you will need 2 events:

  • one with a condition that checks if the cursor’s X position is less than the player’s position. The action will be that the direction changes to the left.

  • the other with a condition that checks if the cursor’s X position is greater than the player’s position. The action will be that the direction changes to the right.