cacotigon's Forum Posts

  • Tried out a couple of projects, everything looks spic and span. Thanks Ashley!

  • , SullyTheStrange: Yeah, as I mentioned at the end of my original post, that's what I ended up doing, which works just fine, but kind of pain, since I've got to remember to do it for every new sprite animation that I add.

  • well, as I understand it, Families have individual SOL lists just as Sprites do, so I would expect that particular Families SOL list to be set to the last created instance, just as sprite SOL lists do.

    EDIT: What I mean is that the ButtonFamily SOL list should (at the time subsequent to the Create ButtonFamily method) contain only a single UID, it doesn't really matter if it's ButtonA/ButtonB/ButtonC, since I'm using properties (X position) which are common to all of them.

  • Since no one has responded, I'm going to go ahead and file this as a bug.

  • <img src="http://dl.dropbox.com/u/12667027/Construct%202/Family%20SOL%20Filter/FamilySOL.png" border="0" />

    FamilyButton contains sprites ButtonA, ButtonB, and ButtonC.

    Right-Button Mouse Click creates a row of three adjacent buttons.

    Pressing Z puts the first one down in the correct location, but because the family SOL hasn't been updated, it puts the others in random locations.

    Can anyone tell me why the Family SOL is not being filtered on each subsequent System.Create? Shouldn't it behave the same as System.Create for specific sprites?

    -- cacotigon

  • Nevermind, I think Yann is referring to this from the manual:

    "The System object

    In Construct 2 the System object represents built-in functionality. It has no instances. This means most system conditions do not pick any instances: they are either true or false. If they are false the event stops running, otherwise the event continues without the picked instances having been changed. There are exceptions, though: if a system condition uses an object, such as Pick random instance, that will affect the picked objects.

    System actions do not run on any picked objects: they simply run if all of the event's conditions were met."

  • Yann can you explain what you mean by:

    "Also System expression doesn't filter the SOL."?

    Are you referring to the System distance call? Are you saying that it doesn't act on the current SOL list?

  • oh yeah, I see what you're getting at. Bleh, that *IS* annoying. Maybe something like this, a second boolean for keeping track if A is already in a "overlapping state" with any B this tick.

    example:

    For(B) --> B.Overlap = 0

    For(A) --> A.AlreadyOverlapsThisCycle = false

        if A overlaps B

          B.Overlap++

          A.AlreadyOverlapsThisTick = true

        if A !overlaps B

          if !AlreadyOverlapsThisTick then A.Overlap = false

  • Can you just encapsulate this entire thing in an outer For Each Object B call? You want to check each B against the entire list of Object A.

    EDIT: Keep in mind that a single object A could be in range of more than one Object B though. So if you want to account for this, you'll need to have an Object A boolean instance variable HasBeenCounted to make sure that each object A can only get "caught" once.

  • Created very simple capx to demonstrate another family variable bug.

    Family Var Value Bug

    In this capx file, I have three sprites, called ButtonA, ButtonB, ButtonC, all of which belong to FamilyButton. FamilyButton contains a family variable called "ButtonType" which has already been set to A, B, and C respectively for each Button's inherited family instance variable ButtonType. (I did this after I created a blank layout called Layout_Defaults which contains one instance of every sprite in the project, since if there are no instances, attempts to edit an instance variable result in check failure as per my previous post).

    Now, in my main layout, I dragged ButtonA, ButtonB, and ButtonC to the layout, but to my surprise, all of the ButtonType var were set to 'C'.

    Repro: (Just use my capx)

    1. Open example capx

    2. Drag any Button sprite onto Layout_Main.

    3. Observe that the family instance var default value is the same for all of them.

    NOTE: Programmatically creating instances of ButtonA/ButtonB/ButtonC through System.Create or Spawn calls retain the correct default values, showing A, B, C inside their ButtonType var.

    -- cacotigon

  • Specs:

    Windows XP SP3

    Construct 2 r79.3

    Intel Centrino

    Repro

    1. Create sprite1

    2. Create family1

    3. Add sprite1 to family1

    4. Add family instance variable var1

    5. Delete all existing instances of sprite1 from layout

    6. Click on sprite1 in Project toolbar

    7. Attempt to change the value of *sprite1* family instance variable var1

    Following error occurs:

    ---------------------------

    Construct 2 Check failure

    ---------------------------

    Check failure! This is probably a bug:

    Changed an instance variable property with no instances selected

    Condition: !pPropertiesBar->selected_instances.empty()

    File: Bars\PropertiesBar - Instance.cpp

    Line: 664

    Function: void __thiscall InstanceVarPropertyChangedHandler::CreateUndoPoint(const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &)

    Build: release 79.3 (32-bit) checked

    Component: Construct 2 IDE

    (Last Win32 error: 0)

    You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl+C to copy this messagebox - it's useful information for the developers, so please include it with any bug reports! Click 'Abort' to quit (unsaved data will be lost!),'Retry' to turn off messages for this session and continue, or 'Ignore' to continue normally.

    ---------------------------

    Abort   Retry   Ignore   

    ---------------------------

  • Here's a quick capx if you want to see it. Try to drag an instance of sprite onto the layout.

    Family variable instance check failure

  • Link to r79.2 family instance variable check failure:

    R79.2 Family Instance Check Failure

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Specs:

    Windows 7

    Acer Aspire One

    Construct 2 32-bit r79.2

    Steps to reproduce:

    1. Create project

    2. Create a sprite1 and drop into layout

    3. Create a family and add sprite1

    4. Add an instance variable to family called var1

    5. Attempt to drag another instance of sprite1 onto layout

    6. Check failure results

    Pasted text:

    ---------------------------

    Construct 2 Check failure

    ---------------------------

    Check failure! This is probably a bug:

    No instance value for instance variable

    Condition: i != instance_values.end()

    File: Projects\InstanceVariable.cpp

    Line: 176

    Function: class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > __thiscall InstanceVariable::GetInstanceValueStr(class ObjectInstance *) const

    Build: release 79.2 (32-bit) checked

    Component: Construct 2 IDE

    (Last Win32 error: 0)

    You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl+C to copy this messagebox - it's useful information for the developers, so please include it with any bug reports! Click 'Abort' to quit (unsaved data will be lost!),'Retry' to turn off messages for this session and continue, or 'Ignore' to continue normally.

    ---------------------------

    Abort   Retry   Ignore   

    ---------------------------

  • Heh, no problem Sully ;) I was going to make a family instance variable called NextSection_UID, such that the code would be more modular and you could have multiple trains going at once, but even in r79.2, I GOT A BIG FAT "No Instance value found for instance variable" check failure.