How do I: Pick a random UID Or IID

  • Hello I made something where is spawning randomly placed Enemies.

    But Then I realized I needed Terrain objects. So, that didn't work.

    So in other Terms I need. To pick a randomly object by, UID Or IID.

    I'm using: system / create objects / I select the object to create: enemy/

    then I need to put it somewhere, I made a object where Enemies should Spohn.

    That is where the problem comes, it's picking the one with the lowest UID or IID.

    Not quite random.

    So if you know some solutions, it would be nice if you, posts a construct2 example,

    or a, image, so I can understand.

    And if you don't no a solution. Well, Have a nice and creative day. (◠‿‿◠)

    _____________________________________________________________________________________________________________

    Note: I have to full version of construct2, it just said Account could not found, so I made a new account.

  • UID are assigned on creation on the layout (during your design), if you want to pick a random spawn object to place the enemy simply use pick random (your object) and that's all. (and use spawn instead of creat object)

    maybe this can make it more clear

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you, you see I'm 95% word blind. And it's hard to make my program read everything.

    A To be honest I didn't know that function existed, but now I do.

    So thank you danuyos

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