More clarity of conditional functions

It’s confusing to know what conditions pick the first object or all of them
And when a for each object needs to be used as a main or a sub-event this is also true for conditions that trigger once by default to a lesser degree. when all three are combined it becomes an issue like when you need to use a trigger once in a for each object condition, in which you would need to use a variable for.

In summary object picking and what some of the conditions are actually doing is not being relayed to the user in some way like an icon or colorization indicating what that condition will do or work together. currently when you make a condition or action asynchronous it gets an icon relaying to the user that the functionality is different from others

1 Like

Edit: I misunderstand the question. To keep the post clean, I’m gonna “hide” the irrelevant part.

object picking info (click to open)

It took me a long time to understand object picking. The documentation on the subject is minimal.

The conditions are like filters. Without any conditions, an action will effect all of the instances of an object. Conditions take the list and keeps the objects that match the conditions. Each condition within an event or a subevent use the list which is referred to as pick list. Any additional conditions will filter the list further.

You might start with 50 instance.
The 1st condition could reduce it to 20.
The 2nd condition could keep it at 20 or reduce it to 5.

If any of the conditions have zero matches then nothing else will happen. The actions won’t be triggered.

There are at least 2 conditions that will reduce the list to always a maximum of 1 instance. Pick the nearest object and pick a random object.

Even conditions like cursor is on object or point is inside an object can pick more than 1 object if someone touches multiple objects or the objects overlap.

There are times when the last condition should be either pick a random object or pick the nearest to the cursor X, Y

I need to go. I’ll try to post more later.

I did a lot of testing to understand the concept. The expressions number or count of picked objects really helped to understand how many objects were picked. I also used the tint action and effects like outline to add visual feedback as to which objects were picked.

As far as when to use for each object. That’s difficult for me. GD object lists already have a sort of built in for each object. Now, if you assign a fixed number to say an animation, it will apply it to objects. So, for each object isn’t needed.

But, if the action relies on specific data that might come from a linked object or a calculation then you’ll probably going to need a for each object. It’s easy to set all objects to the same value. It takes more to set them to different values.

That’s not always the case. If an action references to itself then you might not need a for each object.

Example. If you had a bunch of text objects with the object variable caption. You could set the text to the object variable without using a for each object.

Set NewText text to NewText.Caption

The same is true with random numbers.

Set X of object to random(100)

I would assume that all of the objects would be set to the same random number but GD does it’s own internal for each and gives each object it’s own random number.

Again, I got to go. More later if I can.

I think I touched a little on both sides, actions and conditions. If you have something specific. Let us know.

1 Like

Hey there I appreciate you trying to explain object picking to me but I already understand the concept. I’ve been a gdeveloped user/contributor for a very long time I just don’t use the forms

1 Like

I think what Entropy is looking for is for conditions to explicitly specify “(All applicable)” and “(First applicable)” in some way, because some conditions only do one or the other. Or at least, they used to.

1 Like

Oh, I see. You’re looking more for visual cues or more detailed descriptions or help. Gotcha.

1 Like

Please can you give some examples to help understand the issue ?