Help with a custom Behavior

Hi, I’m new to GDevelop and I’m trying to understand the mechanism of the behavior.
I wanted to make a behavior that could make an object “see” another object (target) using raycast and I’m here:

Has_Target is the boolean to know if the target is seen or not: if is false it cast a raycast from the position of the object and if it touch the target it change the boolean and reset Raycast_From_Tank_X (the variable where I store the X of the target if hit by raycast).

I don’t know if it’s even possible doing something like this but someone can give me some help?

Obviously I’m also open to other ideas to check if an object see another! :grin:

Hi,
What problem are you having with these events?

Strange that boolean is true/false on one side and yes/no on the other side :confused:

Sorry for the late answer and thanks for the answer but I thik it was a mess and I have changed everything! :grin:

1 Like