How do you set up a choose set value sucessfully?

0 favourites
  • 4 posts
From the Asset Store
10 Beautiful Pokemon-like Building Pixel Art Sprite Sets
  • Do you set it up like this?

    choose("1","2","3","4,","5","6","7","8")

    or this?

    choose(1,2,3,4,)

    or this?

    choose( 1 ,2 ,3 ,4 )¨

    or in another way?

    should it be a space between choose and (?

    Should you have etctera at the end? I have been told sometimes that you need it at the end but have also been told sometimes that you should not put it in becuase it makes Construct choose it sometimes and make nothing happen.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • choose(1,2,3,4)

    or

    choose( 1 ,2 ,3 ,4 )

    work.

    The first one as far as I know chooses "1", "2" and so on as characters and not numbers.

    Kind of like if you're inputting "char" as opposed to "int"

  • things like this work too

    choose(int(random(1,5)),int(random(5,10)))

  • when in doubt read the manual ,

    [quote:2phuxic6]choose(a, b [, c...])

    Choose one of the given parameters at random. E.g. choose(1, 3, 9, 20) randomly picks one of the four numbers and returns that. This also works with strings, e.g. choose("Hello", "Hi") returns either Hello or Hi. Any number of parameters can be used as long as there are at least two.

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