We need a "make default instance" button and label!

Discussion and feedback on Construct 2

Post » Sat Mar 28, 2015 7:08 pm

@Ashley
(Note: By "default instance" I mean the very first instance of an object type created for the project - the template that future instances inherit all of their properties from, not the first instance in a given layout or having an IID of 0.)

Basically there's no way of knowing which instance is the default, nor where it's located if you want to change its properties (unless objects are stored in a separate dedicated layout, but sometimes you forget to do so). We also don't have any way of changing which instance is the default, which in some cases automatically changes behind-the-scenes.

So I propose we get a "Make Default Instance" button in the object properties. When it is clicked, all future instances will inherit the properties of this instance. A small label at the top of the object properties saying "Default Instance" or "Template" or something would be very nice as well.

This will also let us work around the bug where new tilemap instances inherit the placed tiles from a previous instance instead of the blank default instance. (I meant to report it but found it difficult to reproduce; seems to just happen over time.)
Last edited by Tokinsom on Fri May 08, 2015 5:37 pm, edited 10 times in total.
Image
B
230
S
27
G
13
Posts: 1,782
Reputation: 18,165

Post » Sat Mar 28, 2015 9:21 pm

I thought the lowest index was the default.
Object(0)
Image Image
B
164
S
49
G
114
Posts: 7,668
Reputation: 79,535

Post » Sat Mar 28, 2015 10:53 pm

@Newt Pretty sure that's just the IID for runtime purposes. The object properties only displays the UID which isn't very useful at all.
Image
B
230
S
27
G
13
Posts: 1,782
Reputation: 18,165

Post » Sat Mar 28, 2015 11:01 pm

Can't you just use a family? Fairly sure you can use them to set the variables for all instances.

Are is this just for the new tilemap just being a copy of the previous tilemap?

Speaking of tilemaps, I'm annoyed that if you shrink them from bottom towards the top;
The tiles on it disappear as you go up. But if you go from top to down, The bottom part is getting cut instead of the top part. If you know what I mean.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Sat Mar 28, 2015 11:38 pm

I'm not talking about anything during runtime, guys. I mean the default instance in the editor - the very first instance ever created that future instances inherit their properties from.
Image
B
230
S
27
G
13
Posts: 1,782
Reputation: 18,165

Post » Sun Mar 29, 2015 12:00 am

Ok, but even if he were to add something to display the iid, theres a chance it could change when you change an instances z order.
That makes editing in the editor somewhat unreliable.
... rolls eyes
Image Image
B
164
S
49
G
114
Posts: 7,668
Reputation: 79,535

Post » Sun Mar 29, 2015 12:34 am

What are you talking about dude. IID's are unique to the instances in a layout and only utilized at runtime. I don't see how they have anything to do with the project's default instance of an object type, which is what this thread is about. I never even asked for the object properties to display the IID - just if it was the default instance (the very first instance created for that object type in the whole project, not at runtime or in a specific layout)
Image
B
230
S
27
G
13
Posts: 1,782
Reputation: 18,165

Post » Sun Mar 29, 2015 12:54 am

well, Actually I find a bug...

when you create your first instance (object), and for example, set 2 different variables...this will be setting by default (like your suggestion)

after this, when you are making a new instance, the variable would be the same of the old one... but there is a problem, when you remove all of the instance, (appear "you have deleted the last...") and you try to change the variable to make a new default instance variables, (click right in the object on Projects windows), this will not works, contruct2 will load the old variables of the first instance...

so, I think this should be fixed, because you can't actually set a new default instance... If it was possible, you don't need any extra options to make it, but a new options is good, so, I suggest to insert in the properties of the object, just a button set as default instance, (same to the first instance)
B
19
S
9
Posts: 298
Reputation: 2,910

Post » Sun Mar 29, 2015 1:19 am

The iids are given by their z order, the object with the lowest iid is the default object. (the initial object may not be the default instance because of this... dude)
If you look at the z order bar you can find the default object by finding the instance closest to the bottom of the list.

Unless you mean something else when you say default object.
Image Image
B
164
S
49
G
114
Posts: 7,668
Reputation: 79,535

Post » Sun Mar 29, 2015 1:47 am

Just tested, and apparently iid is no longer tied to the default at runtime.
While the default iid is always 0, the 0 instance is not always the picked instance.
I guess the highest z is for some reason.

https://dl.dropboxusercontent.com/u/666 ... dr200.capx

Heres a capx
text objects are in containers to show the instances iids
At run time clicking the button should pick the default object, move to it, and change the button text to the objects iid.
Nope

Note the iids follow the z order of the instances.
I'll make a bug report later, but I swear I've had one similar already, and the answer was "not going to fix".
Image Image
B
164
S
49
G
114
Posts: 7,668
Reputation: 79,535

Next

Return to Construct 2 General

Who is online

Users browsing this forum: DMike and 2 guests