Using array´s - Send population to work [SOLVED]

0 favourites
  • 3 posts
From the Asset Store
The soundstage is set for an immersive listening experience sending your audience adrift.
  • Hello.

    I generate a small world using arrays, that defines if the population got a work or not.

    -If they have a work, i create a workplace for them - and store that workplaces position in another array

    -Now i want them to go to THAT work place (using pathfinder)

    CAPX

    https://www.dropbox.com/s/efz7cs2cr2gq0 ... .capx?dl=0

    Evt_Startup sets the arrays

    Evt_Neutral sends the population to work.

    My problem is that they go to the top left corner, and dont find the paths in the array "EW_Info" what am i doing wrong here?

  • They're trying to path towards the array location before the array has been filled (or essentially at the same tick). There's no wait anywhere so they all path towards 0,0. If you add a brief wait you'll see they path towards the array loc. However the logic in evt_neutral is still kinda flawed, you'll notice all pop head towards the same work because you haven't assigned pop separate locations, it loops through Population and WorkStation but doesn't pick each pop in turn and assigns them all the same loc.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • They're trying to path towards the array location before the array has been filled (or essentially at the same tick). There's no wait anywhere so they all path towards 0,0. If you add a brief wait you'll see they path towards the array loc. However the logic in evt_neutral is still kinda flawed, you'll notice all pop head towards the same work because you haven't assigned pop separate locations, it loops through Population and WorkStation but doesn't pick each pop in turn and assigns them all the same loc.

    Thank you .

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