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?
+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
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?
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
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=""
--- system: set template to sprite.asJSON
--- sprite: load from json template
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)
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.)
Develop games in your browser. Powerful, performant & highly capable.
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.