Why aren't the behavior settings for my player object being saved?

0 favourites
  • 8 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • Hello everyone, thanks for your time. Something that has confused me for a long time is the seemingly inconsistent way Construct saves, or doesn't save, the behavior settings for certain objects. For example, my player object has the "8-Direction" behavior applied, with all the proper variables on the left-hand side of the screen tuned as needed. However, when I delete the instance of the player object (The only instance of this object in the entire project, mind you, so multiple instances aren't the issue), and re-insert the object into the layout, the settings are back to default. What's frustrating is that this isn't happening with other objects, so it's difficult to figure out what makes this particular object any different.

    Any ideas?

  • In general the logic is that it uses the instance with the lowest IID unique identifier as the basis for all future instances. If none exist then it puts in default values to the first instance created. However you've come across a scenario where it does store settings from a previously deleted instance which might be a bug, it's happened to me before and I'm not sure how it happened but don't take this as the norm, the expectation is that it creates the first instance with default values and you should be keeping one instance of the object around in the layout to 'store' the altered settings.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Well I did some investigation because I'm a QA and couldn't help myself. This is the inconsistency :

    - Create an object

    - Add a behaviour

    - Edit the behaviour

    - Delete the instance

    Now when you add any instance it has the edited behaviour stats from earlier as the default. This occurs if you create a new object, then edit the stats and delete that initial instance.

    Ashley bug or as designed? thanks

  • The instance properties are stored in the instance. So if you delete it, those properties are gone.

    When you create a new instance, Construct will copy the properties of an arbitrary existing instance. If none exist, it will try to use the properties of any previously deleted instance. If there are still none, you get the defaults.

    So the properties you get depend on whether there are other instances in the project, or whether you previously deleted instances.

    I think there might be a small inconsistency in how behavior properties are handled though, they don't seem to refer back to deleted instances. I'll look in to that a bit further.

  • Actually, I can't find anything that's wrong, it all seems to be working correctly. If Construct is doing something like inconsistently copying some properties but not others, please file a bug following all the guidelines.

  • Actually, I can't find anything that's wrong, it all seems to be working correctly. If Construct is doing something like inconsistently copying some properties but not others, please file a bug following all the guidelines.

    The issue is that if you edit the very first instance and then delete it, then all future instances use these values. The user is left wondering why it is creating new instances with these random values seemingly 'saved', the preference would be always default in their mind. Also any new instances you create and delete, their values never override this initial deleted instance it is referencing. Sure I can file a bug for what I think is happening.

  • > Actually, I can't find anything that's wrong, it all seems to be working correctly. If Construct is doing something like inconsistently copying some properties but not others, please file a bug following all the guidelines.

    The issue is that if you edit the very first instance and then delete it, then all future instances use these values. The user is left wondering why it is creating new instances with these random values seemingly 'saved', the preference would be always default in their mind. Also any new instances you create and delete, their values never override this initial deleted instance it is referencing. Sure I can file a bug for what I think is happening.

    Ashley

    Well put, and thank you! Yes, the problem is that I assumed these behavior settings (of a freshly placed instance) would either always return to their default states, OR inherit the settings of the lowest IID instance (whether present in a layout, or previously deleted); but it seems to do one or the other, and its unclear why.

    So my followup statement/question is this: Almost all of these behavior settings can be set at the time of the instance's creation via the event sheet, so my problem wouldn't be that big of a deal- except there's one setting that ONLY exists in the behavior settings bar, and that is "set angle". I want it set to "no" once the instance is created, except that isn't the default setting and I can't change it via events.

    So the only option I'm left with is putting an instance outside the bounds of the layout with the correct settings, so that the next instance I spawn inherits those settings? That just doesn't seem right, I feel like I'm missing something here? Your help is appreciated, thanks again! (Also just wanna say, I really love Construct and am thankful something like this exists for artists like me who can't code! Thank you Ashley and everyone at Scirra!)

  • As I said, if you can reproduce a case where Construct seems to get it wrong, please file a bug following all the guidelines. It's the usual way that we deal with problems and the process is designed to maximize the chance we can fix the problem.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)