Object out of layout

Discussion and feedback on Construct 2

Post » Sun May 04, 2014 12:58 am

I do not know if someone already asked this but if not asked is weird. In C2 we have to put the objects in the layout to set its properties but after that we can not delete them because C2 does not allow because of that properties you setted up. But the problem is that one instance of the object is in the way. Why? See the example I have an object X that is defined that when he "out of layout" it will be destroyed and will generate another object Y, just that I can not put it in the layout because it should only be created after, then not appear in the layout I put it outside, what happens? The C2 obeys the condition "On leaving the layout: Create the object Y" and the problem emerge .. this annoying problem of C2. Of course I can solve this by using a different way but it would be simpler to have an object type property "does not create the beginning" or something? Please read it carefully. Thank you!
Be nice with others and with yourself!
My musics: https://soundcloud.com/vinians
My C2 Forum:
http://nmbr.forumeiros.com/
My Site:
http://www.dicasebytes.com.br
B
22
S
5
G
6
Posts: 167
Reputation: 4,954

Post » Sun May 04, 2014 11:18 am

I believe that if you have a placeholder layout for your objects, you don't have to populate your current layout with the "Spawner" object. So, you can create it with events at run time and you should be ok.

An other thing you could do is to put an "on layout start" event and destroy both the "Spawner" and the "spawned" objects out side of the layout.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Sun May 04, 2014 2:06 pm

Yes I know it works, there are a lot of ways to fix, but what Im saying is why Scirra does not solve it for us with a simple propertie like "AutoCreate" false/true.... you know, C2 strong point is precisely to make things easy for us.
Be nice with others and with yourself!
My musics: https://soundcloud.com/vinians
My C2 Forum:
http://nmbr.forumeiros.com/
My Site:
http://www.dicasebytes.com.br
B
22
S
5
G
6
Posts: 167
Reputation: 4,954

Post » Sun May 04, 2014 3:03 pm

I understand what you're saying. I trouble's me too, since I know nothing about programming and software development, I don't really get why does an object have to exist somewhere on a layout. Why it's existence on the Project's "pool" isn't enough...? It's confusing but I am sure there has to be a solid reason behind Scirra's design decision.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Sun May 04, 2014 4:19 pm

I would guess it is because it is much simpler to do, like you can visually set the size and angle, also the values of each variables, it also forces you to set it, since it takes this instance you create as a reference (even in the editor itself, have only one instance of a sprite, change it's size, then add another one in the layout view: it is the same).

Also I would guess the object type define more the reference of the identity, more than the actual settings of it.

Anyway, I think it would be more trouble to have to set it without a visual representation anyway.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Sun May 04, 2014 8:30 pm

@Aphrodite

Of course I understand the benefits of visual representation, I never meant that C2 had to have a non visual method of object creation and parameterization. I think that having created an object and set it's initial parameters of that type should be enough, since it exists as a class (?) within the Project. I think of the unity's workflow, where you create your object(s), make them a prefab and then delete them from the scene if you wish. At any time they are accessible thru scripting. In Construct this limitation some times can be little confusing. At least to me :)
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Sun May 04, 2014 8:51 pm

Use: On destroyed X => create object Y

And if need be, add some boolean or variable which can determine wheter or not object Y needs creating.

ObjectX.MyBoolean = false (dont create)
ObjectX.MyBoolean = true (create)


event:
On destroyed object X
ObjectX.Myboolean ? (booleann true or not)
action:
create object Y
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Sun May 04, 2014 11:55 pm

Consider making one of your layouts called. Prefabs.

Even in Unity you still need a defined object. The Objects bar on the right(or custom left) is not the same as Unity's Heirchy Tree. it's just tree of objects in the game. So a prefrab is just an indivdual object placed in a psuedo heirchy that isn't linked to anything.

However regardless of all of that. I do believe Ashley said it's on the to do list. However honestly it's so small and non factor and using a layout answer it. that it's not worth really putting high up ont he lsit
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,038

Post » Sun May 04, 2014 11:56 pm

eli0s wrote:@Aphrodite

Of course I understand the benefits of visual representation, I never meant that C2 had to have a non visual method of object creation and parameterization. I think that having created an object and set it's initial parameters of that type should be enough, since it exists as a class (?) within the Project. I think of the unity's workflow, where you create your object(s), make them a prefab and then delete them from the scene if you wish. At any time they are accessible thru scripting. In Construct this limitation some times can be little confusing. At least to me :)

Indeed... This is exactly my problem and I think its not so hard to implement in C2 but it seems that C2 creator does not want to implement it for some reason because this is not the first time someone discuss about this issue.
Be nice with others and with yourself!
My musics: https://soundcloud.com/vinians
My C2 Forum:
http://nmbr.forumeiros.com/
My Site:
http://www.dicasebytes.com.br
B
22
S
5
G
6
Posts: 167
Reputation: 4,954

Post » Mon May 05, 2014 10:44 am

jayderyu wrote:Consider making one of your layouts called. Prefabs.

Even in Unity you still need a defined object. The Objects bar on the right(or custom left) is not the same as Unity's Heirchy Tree. it's just tree of objects in the game. So a prefrab is just an indivdual object placed in a psuedo heirchy that isn't linked to anything.

However regardless of all of that. I do believe Ashley said it's on the to do list. However honestly it's so small and non factor and using a layout answer it. that it's not worth really putting high up ont he lsit


This is a fair comparison. Since this is in the to do list I am more than satisfied. I don't think it is something crucial either. It is just an other thing to keep in mind ;)

Vinians wrote:Indeed... This is exactly my problem and I think its not so hard to implement in C2 but it seems that C2 creator does not want to implement it for some reason because this is not the first time someone discuss about this issue.


Now, I believe you're over-thinking this. I am sure it doesn't have to do with what Ashley want, I suppose it's more like a technical issue :)
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests