A bunch of noob questions on GDevelop

Hi, maybe it’s just that I am dumb cause I have read the documentation a lot of time, but there are some thing that I don’t get on GDevelop so I’ve done this list and I REALLY thank whoever will lose some time to help me answering them:

1- The variable in an Object can be created in the Scene Events or need to be created also in the Object editor? And it’s the same for the Variable in a Behavior or Function?

2- An Action Function, will remember the change in the Variables inside of that? Or it reset everytime it’s fired from the Scene Events? And are accessible from the Scene Events?

3- It’s possible to select an Instance Object with the Raycast? Just to clarify: if I have a bunch of the same objects and I want to select just the one struck by the Raycast, what’s the Action that I can use to do it?

4- An event with two conditions is fired when they are both true? It’s a “AND”? And there is a way to make it a “OR”?

I know that for some of you these are just dumb questions but… well, maybe there are other noobs like me out there that need some certainties in their life! :grin:

These aren’t dumb questions, so I’ll do my best to answer what I can here for you:

#1 Unfortunately, this question doesn’t make sense to me, sorry.

#2 As far as I know, functions are self contained, behaviors can have long-running variables with pre/post step methods. Neither variables are addressable via the event sheet unless you actively know what variables are being used in the behavior, I think.

#3 Yep, absolutely. Look at the basic ai with pathfinding example to see them select an object that is within the raycast.

#4 All conditions in a single event box are evaluated and required, so they are treated as “AND”. You can use the “OR” operator (it’s a condition) if you want to add an or statement.

1 Like

For question 3, 2, and 1, I think Silverstreak will answer above. I’m also pretty dumb. For question 4; a condition will only run the action if both conditions are true.

if an object has an object variable, it has it. you can set it beforehand in editor or via events. there is no difference.
you can give an object a variable during runtime with events, without the need to have it be placed in the editor.
custom behaviors and functions are basically the same, and both would treat variables the same.

1 Like

Thanks to everyone! I think I have grasped something more on this software.