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

Get help using Construct 2

Post » Mon Nov 28, 2016 7:58 pm

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?
Last edited by CrudeWall on Tue Nov 29, 2016 6:45 pm, edited 1 time in total.
B
16
S
8
G
1
Posts: 154
Reputation: 2,556

Post » Mon Nov 28, 2016 11:03 pm

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.
B
47
S
17
G
81
Posts: 2,223
Reputation: 48,093

Post » Tue Nov 29, 2016 6:45 pm

plinkie wrote: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 :) figured it was something as simple at that - and i will fix my flawed "coding" at a later state :D now i at least know that my citizen was not all crazy ;).
B
16
S
8
G
1
Posts: 154
Reputation: 2,556


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 54 guests