let me say that I love GDevelop and it really sparked my interest in programming after many years.
In the past, I used Game Maker and Construct for some time. After a couple of games that I made in Gdevelop I started to miss a few actions/conditions that were present in either Game Maker or Construct (or both). Again, most of these may be already implemented in Gdevelop but I may be unaware of them (I’m still a beginner). That’s why I would like to ask the community (and maybe also 4ian -whom I greatly respect) if there is any reason these actions/conditions are not present in Gdevelop:
Else condition - I’m missing this a lot. I know how to do it in Gdevelop but it would be way clearer with ELSE. I’ve read that it would be extremely difficult to implement it in Gdevelop so that’s probably why it’s not already there? If so, is Construct 3 so different? (it has else condition)
“On creation” condition- omg, I’d love this condition because I frequently want something to happen to the object upon creation.
BTW, if I want to create an object and assign value to its object variable, how do I do that? For some reason, if I want to edit the object variable in the object editor, I can’t use expressions like Random() as a value. Why is that?
“On destroyed” - see above
Every second condition - I know it can be done through timers but this would be easier
“Wait” - In Game Maker, I remember there was an action with which you could pause the execution of your game for a specified number of milliseconds. I think that this can be done in Gdevelop using Change time scale action. The problem with it is that then you have re-activate it by using a timer, which is annoying. - I might be mistaken here though
If the position is empty condition - again, this may steam from my lack of knowledge but I haven’t found a way to check that
Yes, there are no Else condition in GDevelop
There are no On creation condition in GDevelop if you are referring to objects. But you can achieve this by creating an object and doing an action along with it.
or, if you are referring to this
As far as I know, there is no On destroyed condition too but you can achieve this too just like the previous one
Don’t know what Every second condition is. Or are you referring to this
Don’t know Wait action. Could you please explain more. I Googled it but can’t find anything about it. If the position is empty condition ? I can’t understand what you are talking about? How can a position be ‘empty’?
If I am wrong, other members can correct me or clear my doubts
Thank you guys for answers. I will try to comment.
Yes, but if you create numerous instances of the same object and you want to do different actions to each one of them, Gdevelop starts to have problems distinguishing which instance is which.
I meant something like this. In Construct 3, there is a condition “Every tick” , which basically means every frame. But there is also a condition called “Every X seconds” . You just define how often you want the action to be performed.
For example, then it looks like
Condition: Every 2 seconds - action: create object enemy
I know you can do this via timers in Gdevelop but this is way quicker. Also, I feel bad for creating so many timers lol.
What does this condition “Always” do? I’ve never used it. Is it like “Every tick/frame…do…?”
For example, in the old version of Game maker, there was an action Wait. If you put it there and defined for how many milliseconds you want it to happen, the game would freeze for the time you specified.
I meant a condition that would check if there is no object on the coordinates that the object is to be created. For example, If there is no object “wall” - create…
Omg, I didnt know I could do that. Thank you so much!!
You can simply do a position check with the not condition:
Note that inverting would trigger for every instance that does not touch the position, the not event is therefore used to not trigger unless the condition is false for all instances. If it is too tedious to write that out every time, GDevelops powerful events based extension feature lets you create your own condition for it:
Each time we had discussions about it, we were not sure how to do object selection.
As said above, a custom behavior should be the way to go. We could probably add those conditions but we already have the (more flexible) events-based behaviors so it would be a pretty low priority.
Check out the “Repeat every X seconds” extension . It is a nice little wrapper around timers to allow for less boilerplate.
This is planned, but we won’t get this for some time: we first want to add asynchronous action. Those are actions that continue executing in the background while the rest of the events sheet continues executing, and once that action finishes executing it will finish executing the actions after it and subevents.
This would be used for network operations that can take some time and this wait condition among other things. There has been some talking about it but no work was started for it as of now.
I know and I’ve been always wondering why you guys dont get inspired by how Construct or Game Maker implemented it. Or are those engines that much different?
Well, the conditions would be nice but I can definitely do with the custom behavior (I didnt know you could do that)
Omg! Amazing! That’s exactly what I wanted! Thanks for letting me know!
I’m glad it’s planned!
By the way, there is one more feature that I forgot and would like to see in the future and that is Paths. What I mean by this is nodes that you would place in some kind of editor and then make for example an enemy object to go from one node to another.
Something like in this video: https://www.youtube.com/watch?v=szqYKdbWFFc
Do you plan anything like this? I know that Pathfinding is already there, but this is a little bit different.
Hmmm…that really isn’t different, it’s literally pathfinding, and even nodes are possible using the virtual grid.
To clarify, that’s not really how that works.
Actions in an apply to the selected object. Upon object creation, that object is selected (unless you’re using a “Number of objects” condition, which selects all of the objects, or doing the selection in the same event, which adds to the current selected objects list).
So You could have
(Event 1Your Conditions) || Create Object A at X/Y
|| Tint Color of A to 255;0;0
(Event 2 Your conditions) || Create Object A at X/Y
|| Tint Color of A to 0;255;0
And both As would be different colors. I tested this here and it works fine:
Really? I thought that in Pathfinding, the object tries to find a path among solid objects while in Paths the object follows the specified path.
How can I access the virtual grid and nodes? Is there any tutorial?
I have checked all of these examples and none of them are what I meant. What I want to do is to program a predefined way (a path) according to which an object would move. I guess this is either very difficult to do in GDevelop or impossible.
You would just store the points either as objects or as variables, and use pathfinding to go to each point.
Edit: In fact, that’s exactly what they’re doing in the video. They’re storing each step of the path’s X/Y values as data in their game, then just having the object go to the next point after reaching the current one. Visualizing it is a different thing entirely.
Or you could just create objects to use as pathpoints, and add them to the scene with whatever order you want. Add an ID variable to them, then add a “NextID” variable to them. Set up a “For Each pathpoints object” event, have the condition be something like “CurrentPoint (Global/Scene/object variable, you decide) = pathpoints.Variable(ID) " | Move player to PathPoint.X()/PathPoint.Y()”
Once the player is in collision with the pathpoint, you then update the CurrentPoint variable to the pathpoints.Variable(NextID) variable. It’ll then start pathing to the next object. Etc.
Hello @jumpingj. I can’t access your file nor download it, I don’t know why. @kattan also uses the same website as you do to share files but I can access and download his files from the same website that you use but I can’t access your file.