Help with "Pick Object With Highest Variable"

This forum is currently in read-only mode.
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • I need some help with the "Pick Object With Highest Variable" action. I made a simple cap with three instances of a sprite object. The objects each have a private variable called cSpeed, set to 1, 2 and 3 respectively. Then, during the startup, I call "Pick Object With Highest Variable" and tell it too look at the objects' speeds. Then I set a text object to the cSpeed of the object that was selected.

    It seems like it should be simple enough, but nothing happens. The text field never changes. If I put a message box action after the "Pick Object With Highest Variable" condition, it never fires. I feel like I'm missing something here.

    Pick Object With Highest Variable Cap

    Thanks for the help

  • They all have 'destroy on startup' attribute ticked.

  • They all have 'destroy on startup' attribute ticked.

    Ah yes, yes...... so sorry for that..... That one little box makes a big difference apparently. Thanks for taking the time to check out the file and for the response.

    Now things work pretty well when I start the cap with three character objects created at startup. However, when I spawn the characters as we've learned about in the platform tutorial, things don't go so well. At runtime, I create three character objects and assign them cSpeeds of 1,2 and 3 and I can see that each character has the correct cSpeed, but the "Pick Object With Highest Variable" action picks the character with cSpeed = 1.

    Static and Spawning Characters

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It works if you do it on any other tick than the start of layout one.

    I think this is a bug, so submit it to the tracker .

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