How do I stop a family resetting?

Get help using Construct 2

Post » Tue Dec 15, 2015 10:21 am

Hi i have a family which contains many objects and i create an object from the family randomly. the problem is every time i create an object the family resets the 8 direction behaviour.

when the object from the family is created, these 3 behaviours reset the their original setting, i.e. 8 direction, angle Yes and Default controls Yes.

These features which i need cant be targetted in the events to stop it reseting either. such as;
I want to keep the direction to 4- direction,
the set angle to No
and the default controls to No.


None of which i can access in the events sheet, does anyone know how i can fix this?
B
7
S
1
Posts: 54
Reputation: 527

Post » Tue Dec 15, 2015 2:37 pm

+1 for this thread. Maybe it's a bug? every new object added to family, it also reset all behavior to default setting. Just wondering, why no one seems to care about this issue
B
36
S
13
G
1
Posts: 88
Reputation: 3,101

Post » Tue Dec 15, 2015 2:41 pm

Did you set up your default values in the family or in each object?
This might be the cause. Also, which version of Construct are you using?
Does this happen each time, in every family?
Image
B
34
S
6
G
2
Posts: 224
Reputation: 3,355

Post » Tue Dec 15, 2015 4:01 pm

i set the values in the family. I have roughly 20 objects in the family so i could set them all individually if that works allthough it will be very teadious and inefficient considering i will have to write events for each object.
So for people who have this issue with more objects it will be even worse, surely this bug needs to be addressed?

I am using the latest version of construct 2
B
7
S
1
Posts: 54
Reputation: 527

Post » Tue Dec 15, 2015 5:26 pm

When you create your object with events the new object is picked immediately so you can enable/disable stuff with events right there.

mouse: On left mouse click
--- system: create sprite at (100,100)
--- sprite: 8direction: disable

By default when you create a new object it copies all the settings of the first object of that type you put in the editor. If you want to copy the settings of some other object when you create a different one you could use the "sprite.asJSON" expression and the "Load from JSON" action.

global text template=""

mouse: On left mouse click
--- system: set template to sprite.asJSON
--- system: create sprite at (100,100)
--- sprite: load from json template
B
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

Post » Tue Dec 15, 2015 6:07 pm

Yes this is what is confusing me though, when I create object family It should use all the families behaviours right?
Instead for some reason, it is resetting the family behaviours on each object, behaviours which I can't access with the event sheet, such as directions, set angle, default controls (from the 8Dirextion behaviour)
B
7
S
1
Posts: 54
Reputation: 527

Post » Tue Dec 15, 2015 6:44 pm

Try this, this is what I do to set default properties of families...

1) First, make sure you are not in any layout, or to be safe open any event sheet.
2)Then, select the family in the projects bar
3)Last but not the least, set the Default Family Properties.

(Note: Family Properties or Object Properties tend to change when new instance of Family Object or Single Object is added in the editor. Fortunately this doesn't happen during gameplay and the changing of properties only happens to new instances made in the editor. So set Family Properties after you have finished putting Family Object "Instances" in the editor.)
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
63
S
18
G
90
Posts: 1,118
Reputation: 59,540

Post » Tue Dec 15, 2015 9:08 pm

ahh for some reason this worked, I created a new family and transferred all the objects over and for some reason it worked so it must have been some sort of bug from adding objects to the family.

Thank you all for the support.
B
7
S
1
Posts: 54
Reputation: 527


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], MikaelS, nahima, Shenkai the ssj, Yahoo [Bot] and 16 guests