Object Instance default behavior parameter values.

Get help using Construct 2

Post » Sat Feb 04, 2017 2:40 pm

Hi guys

I have a question regarding the default values for a behavior.

So basically in my scene i have an object with 8 movement behavior in place.
Where the max speed is changed to 1000 for example.
And when i create new instance via "System - > Object Create" or via "Spawn another object" action i don't see the custom values i have set before on the original object object 8 movement behavior definition, instead i see default values for this behavior which are automatically assigned when you attach behavior the the object.

Because for me more logical would be if we define values for the behavior on the main object, i expect that every other instance would have those defaults upon creation, just so to avoid manually setting desired parameters via SET action when the object is created.

Is this a bug? Or this functionality is intentionally like this.

Regards,
Igor
B
4
Posts: 10
Reputation: 220

Post » Sat Feb 04, 2017 3:33 pm

How you describe the expected behaviour is how it does and should work. The instance that you have customised the options mustn't be the first instance of that object, you probably have another instance somewhere with the default behaviour. Check in debug layout for other instances with lower UID, that's likely where the created instances will be taking the values from.
B
47
S
18
G
84
Posts: 2,271
Reputation: 49,796

Post » Sat Feb 04, 2017 3:38 pm

Totally makes sense what you just wrote because on start of layout i'm destroying single main instance of the object and creating new from scratch (because its a multiplayer game).

I will now test this without destroying the main "object" and well post my findings here.
Thanks for this!
B
4
Posts: 10
Reputation: 220

Post » Sat Feb 04, 2017 4:35 pm

Actually the proper way of doing this would be defining a family with customized behavior and then you don't have to think about the number of instances on the screen.

Regards,
Igor
B
4
Posts: 10
Reputation: 220


Return to How do I....?

Who is online

Users browsing this forum: aquadijoib, brunopalermo and 11 guests