problem with comparing variables w. functions

0 favourites
  • 4 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Hello guys, I've got a problem and hope you can help me come across this :).

    I've created a simplified version of my problem, it looks like this:

    i.imgur.com/WHopOEm.png

    (can't offer any links, since I don't have the reputation yet)

    capx: s000.tinyupload.com / index.php?file_id=59505791421803139893

    Basically in this example I have 2 values ranging from 0-4 that are selected in a list (multiselect is off); they are sent to a function as parameters and there they are compared and according to how they compare, a variable is set (called return in this example) and returned.

    Now I would assume that when Parameter 0 is 4 and Parameter 1 is 0, it would return 2, but it doesn't. Sometimes on reload it works once or twice for setting it to 0.5 or 1, but not reliably anyhow.

    Help is appreciated :).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's strange. I almost want to say it's a bug, like the Greater than operation isn't working here.

    I would submit a bug report unless someone else find a solution.

  • The first value you use in "Function: Compare parameter" should be just the index 0, not Function.Param(0).

  • Thanks ramones that helped a lot. I did not use that function before and in general dialogs the param is required. Cool.

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