Vitalik_Live's Recent Forum Activity

  • If the enemy values must be 1,2,3,4 then use choose(1,2,3,4), 4 separate values. Or use enemy names, it might be easier.

    Your point is very clear. But for it, I need to manually write actions for each location.

    I want to minimize my code. For each location, I could set the variable loc_monsters which would contain a string with minions IDs. But the expression "choose" didn't work with one string.

    In my example, I need to fill my array enemiesGroup with random values from string loc_monsters. But I don't know how or is it even possible.

  • If there are not many locations then you could just run events by location, if loc=2, repeat 3 times push back of array choose(1,2,3,4). I can't see a need here to make a function that reuses the code for all locations, might as well just force it with enemy types in the 'choose'.

    Thank you for your answer. I don't know how to use choose expression properly. I could save minions ids in string

    loc_minions = "1,2,3,4"

    And if I use choose(loc_minions) it says I need more parameters.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello,

    Could you please help me to randomize value in array?

    I have an array enemiesGroup, the size of which depends on location you are. And for each location there is a unique minion type. In each minion type could be up to n different minions.

    Let's say for the current location the size is 3, and the minion type is 2. There are four different minions in this minion type (1,2,3,4).

    How do I fill my array with random enemies from certain minion type?

    Thanks in advance.

    Tagged:

  • Same issue after updating to r234

  • Thank you very much for your answer! I'm was a bit tired and didn't saw that I use different arrays in my events and actions. My bad.

  • Hello, everyone!

    I've been working on a mobile game and made an array with descriptions of the game locations - prntscr.com/wpkbpq

    I want to set the right data from the array to my variables. For example, when a player is on the locx=1 locy=0 the variable has to be set as monsterid = 1. I have used the system loop but did something wrong - prntscr.com/wpllq2. The variables are always empty.

    Could you please help me with this?

    Tagged:

Vitalik_Live's avatar

Vitalik_Live

Member since 3 Jan, 2021

None one is following Vitalik_Live yet!

Trophy Case

  • 3-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

5/44
How to earn trophies