in this video for an hour I will set the variable id -370 to the same objects.
and if there will be 10,000 objects. And I will need to turn to a specific object. There is such a function in the construct3, an id is automatically created and it can be accessed as a variable. No need to spend years entering 10,000 values of variables.
This is a giant minus!
Most of the times I have believed identification of objects by means of a unique key in GD has been necessary, I have ended up understanding it is not thanks to GD’s automatic referencing system. In other words, each object you need to reference is locatable by means of a condition and/or an event, and there are functions to improve this feature (linked objects function, for example).
Certainly, the system requires thinking differently than is usual for other game development environments; but after a slight learning curve and with a little creativity I have not found any impediment to referencing specific objects in GD. In fact, I find the system very intuitive and easy to use (and this is said by someone who is used to code in many programming languages).
Even in the extreme case that assigning an unique identifier for each object was absolutely necessary (which is my case, because I’m currently working on bidimensional arrays of objects for procedural generation of aleatory environments for my game… yes, in GD) that is perfectly dynamically achievable with a few events (for example with a for each object block at the beginning of the scene).
So, that hour-long video of you manually assigning variables to a gigantic amount of objects… well, that’s cool (you know, yeiiii!, good job!) … but it’s absolutely unnecessary.
GD is not a perfect game development environment, but it is a constantly developed IDE, which has recently made great leaps towards more comprehensive functionality and hides powerful tools under a minimalist appearance.
If your thing is to comment and criticize about software, I suggest you do it on the basis of more in-depth documentation so as not to fall into unintended slander.
I recommend you visit the roadmap in Trello to inform yourself regarding what has been done through the different versions, tools and capabilities that are not obvious at first sight and developments planned for future versions.
Little precision, all objects do have UIDs, they are just no expression to get them, as they are an anti pattern (from what I remember 4ian said) and should only be used when really necessary, and should not be used whenever possible (aka 99,9999% of the time).
If you really need an id, make a “for each object” loop at the beginning of the scene, set variable ID of object to Variable(objectvarname) and add 1 to objectvarname.
the idea is not bad. The technical approach. But I’m just trying to explain to users the program without the wilds of programming. On the construct it is conveniently implemented and I do not think that this is some kind of whim. If there is a way to access copied objects, it’s easier when there are 10,000 of them, then it’s interesting to just see this method. And so that the children would understand. I love programming. But most who apply are looking for an easy way to get what they want.
From the point of view of programming, the program is excellent, a bunch of different approaches to solving problems. But when you are a programmer, you cease to understand what an ordinary user needs, because you understand everything and how someone cannot understand it. just suggested one of the easiest solutions. So far, I have not found a convenient way to determine the address of the copied object. And if there are secrets of documentation that I did not see. Then I am silent about ordinary users.
This is not the first time I have encountered skepticism from developers about questions and suggestions. The forum community helped me resolve the error. When the developers themselves refused to see the error for a week. This really discourages desire. Thanks to the community that the guys were more persistent.
Как я понимаю вы русскоговорящий, поэтому напишу по-русски
Есть простой способ присваивания id хоть 10000 объектам
Yes, that is how you make an ID for your objects. When you write/read it, if it is the animation you want to change, do it like:
Write "Object.AnimationName() in “Animation” + ToString(Object.Variable(Id)) of storage “whatever”
Read “Animation” + ToString(Object.Variable(Id)) from storage “whatever” and store as text in ObjectAnim
It is this part that is crucial: ToString(Object.Variable(Id))
I totally agree that this very handy method could be easier to find and better explained in some Wiki or example. I have to admit I don’t myself completely understand what I am doing, but it works!
Maybe the storage name can be used in a more intelligent way too, I don’t know.
Also check this topic with more extensively about how I got it working and my observations about it: [SOLVED] Save with multiple instances (copies) of an object? - #5 by Spelskapare