im making a game thats pretty complex, and mostly use Pick All Object and Take Into Account Event. but idk which are using the most resource. anyone know the answer?
Those are slightly different types of functions. Can you provide an example of how you might use one instead of the other?
For Pick all object, i use it to pick one object of specific condition from all picked object. which it will be over 100 picked object at one time.
for Take into account usually i use it for deleting stuff and for some object that only linked to one object.
as i progress through the project it will be more complex and i dont really know which event will give more performance…
Neither of these logic methods really relate to one another, not in event logic in general, nor how you are using them in your screenshots.
Also, in your first screen shot, there is no reason for you to use “pick all” at all. By default all objects are selected that match your conditions. Pick all is explicitly just for *undoing" other object picking in the event or parent event.
So “picked all hiredguns” followed by “the variable x of hired guns” does nothing extra for you. Just use “the variable x of hired guns” and all applicable hired gun objects will be picked already.
You should generally be able remove the pick all conditions from the events in the first screenshot.
For your original question, they will both have different performance impacts depending on how they are used and can both be less and more resource intensive depending on how you are using them.
ah i see, could you give me an example for each event, in what way those event become resource intensive,please?
Thankyou!
Most of the times is better to just create custom behaviours.
isnt Custom behaviour mean i have to code it myself in java?
i never create custom behaviour before
No, a custom behavior, is just like an external event, with the difference that it is attached to the scene through the objects that have the behaviour, ensuring all the events only run when the object is in scene, you do not need any JavaScript to use custom behaviours (java script in GDevelop is for when you want to do something that the engine doesn’t have a feature for, or for when you are comfortable writing code and it is just faster for you to work that way, there is no feature in GDevelop that requires you to learn JS besides the JS blocks because GDevelop is made with a “free to use, open source, and for beginners” mentality.)
Custom behaviors are a way of segregating your events to make sure they run when/where you need them to run, and avoid repeating logic, everyone doing multiplayer SHOULD be using custom behaviours instead of scene events, and everyone else should give it a try because it makes things faster and more organized.
Finally most of the stuff that looks complicated about creating custom extensions and behaviors is not actually necessary unless you’re planning on sharing the extensions/behaviours, when they’re private they can be created/added almost as fast as a variable.
Alright that sound like it will solve my problem, i’ll give it a try, Thanks for your Time!