Numbered Instances

I’d like to see at least in the Instance Panel the number of the object instance im working on.

For context…

Im making inventories in my current game, and decided to try and make it as simple as possible so then i can teach people how to create their own in a simple manner.

My approach was to make a single Slot Object and then check if that slot was Empty or Full.

The way i do this is when the item exists in the inventory and the inventory opens, the item is created on a Slot with the boolean Full set to False.

So if the the boolean is set to True, it moves on to the next slot and checks if that one is False, if it is, the object is created there.

So why is Instance Number relevant? Because of the order the Instance are checked.

The original Object is #1 and is the first one to be checked, then next to be checked is the first copy of that object, and then the second and third and so on…

So my items get placed in the order that the Instances were created.

If i for some reason loose track and rearrange the slots while trying different configurations, i have no way of know which is which unless i check the instance list and clique on them one by one to see them match in the editor.

It would be much nicer if i could just select and object in the editor and see its Instance Number in the Instance panel.

Afterall it is the Instance Panel, this seems like good info to have on there :slight_smile:

For example, instead of just having “Instance - Slot” it could have its number on there as “Instance #3 - Slot” or something along those lines.

5 Likes

Yes, that’s true, but what’s the difference with the basic inventory offered in GD?

The “Inventory” system in GDevelop is sort of pre made Variables that help you to take care of logistics. Its pretty good, i use it when ever i can.

What im talking about are Sprites, the kind you actually see in the Editor and in your game.

Instances are sort of Copies of the same Sprite or Object.

What’s the point?
Do you want to create an inventory of sprites for an object to limit the number of objects, the number of object calls, the different elements of the game would then be instances of the same object with a different sprite to improve performance?

What? You completely missed the point…

Let me see if i can explain in a way thats easier to translate…

When you place an Object in the Editor and then Copy / Paste that Object so you can have 2, they are not the same.

They look the same, but they have an invisible number, sort of like an ID.

The first one you put on the Editor, is #1, the copy you made is #2, if you make another copy, that copy is gonna be #3.

They look the same but they have different ID’s.

This invisible number is used when you want to do Object Picking.

So if you forget which Object was the Original, and which was the First Copy and so on, you might run into trouble when doing Object Picking.

Im not sure if that was any better :stuck_out_tongue:

I know what the authorities say, but I don’t understand why there should be a problem with selection…
Look in the RTS extension, there’s selection management and ID allocation.

…again, something is getting lost in traslation…

Its not events, its not code, its not anything like that…

Its a visual feature in the editor.

I0m sorry but I don’t understand, can you explaine me which kind of problem to you have in the editor picking the seconde instance and not the first ? They are a copy of the same object.

I know you guys are just trying to help so i dont want to be a jerk, but this is starting to get really annoying.

I think iv explained the whole thing plenty of times.

If your not understanding what im talking about its because you just dont understand how object picking works, if thats the case go read the documentation, because aparently i cant explain it well enough.

But just as a last ditch effort in case anyone else wants to question my very simple feature request, heres one last go…

  • When you Copy / Past an Object in the Editor, they are now two different Objects.

  • They look the same, they have the same name, everything is the same, **but when doing Object Picking using Events, they will be picked based on their Copy / Paste order.

  • Each instance of the same Object on the Scene has a different “hidden” ID that is used.

  • My Feature Request is so that this “hidden” number is shown in the Object Instance panel, the one with all the properties, like X / Position, ZOrder and so on…

  • In the Scene Editor, on the Top Right side, where you have Options for showing Object Groups, Grid and so on… one of the Option is to show the Instance Object List.

  • When this is turned on, you will see an entire list of all your Object on the Bottom part of the Editor.

  • If you have multiple copies of the same Object, you will see multiples of its name, all in order from top to bottom

  • That is the Instance Order of that specific Object, and thats also the Order in which instances get picked using Events.

  • It would be REALLY handy to have them numbered, for different purposes, one of which the one i described on the original post.

If none of that makes sense…

Please dont keep bumping this feature request with questions that have already been answered.

The request was made, people have seen it, thats good enough.

2 Likes

Hello, yes, we don’t quite understand the context… but it would be good and quick to see the instance number. I don’t think they’ve done it yet because the difference between the instances is the Z order. But if you want to use something other than sorting instances, it would be more practical to know the instance number.

1 Like