How do I do civilization movements around city (LIKE GTA2)

Get help using Construct 2

Post » Sun Apr 24, 2016 3:53 pm

I am trying to make a life simulator game where you will have a house, pets, work, and family. But nowadays I only have a prototype of city with the player and some objects to decorate the city:

Little part of the city:

https://gyazo.com/96214a58a943fb1173f66d2fb92e897c

I need to make a civilization movements for each guy of the city, respecting the road.

What i wanna do:

https://gyazo.com/1e8e3ea5650c3c8a796d9eed8a610566

Thanks you and sorry for my bad english.
Last edited by ElChuchis on Sun Apr 24, 2016 9:33 pm, edited 1 time in total.
B
14
S
6
Posts: 63
Reputation: 1,236

Post » Sun Apr 24, 2016 9:32 pm

I were trying to make it using pathfinder and waypoints system... but dosnt works right because I only have 1 waypoint per corner
B
14
S
6
Posts: 63
Reputation: 1,236

Post » Mon Apr 25, 2016 12:33 am

Here's an idea. You can use the bullet behavior to move the people and the LOS behavior to pick a node to move to.
https://dl.dropboxusercontent.com/u/542 ... _walk.capx
B
91
S
31
G
103
Posts: 5,234
Reputation: 67,754

Post » Mon Apr 25, 2016 10:10 am

R0J0hound wrote:Here's an idea. You can use the bullet behavior to move the people and the LOS behavior to pick a node to move to.
https://dl.dropboxusercontent.com/u/542 ... _walk.capx


That's exactly what I wants to dooo!!! I am going to try it inside my project!

Thanks youu! :D
B
14
S
6
Posts: 63
Reputation: 1,236

Post » Mon Apr 25, 2016 10:29 am

it is possible to make those sprites avoid each other instead of overlaping?
when they are too close?
Last edited by imothep85 on Mon Apr 25, 2016 11:02 am, edited 1 time in total.
B
34
S
13
G
6
Posts: 1,643
Reputation: 8,761

Post » Mon Apr 25, 2016 10:37 am

R0J0hound wrote:Here's an idea. You can use the bullet behavior to move the people and the LOS behavior to pick a node to move to.
https://dl.dropboxusercontent.com/u/542 ... _walk.capx


It works very well, but check this problem:

https://gyazo.com/1a87f1070cd5132684b45f0b1a8aff0e

How can i fix it... seems difficult to fix because we used bullet behaviour :cry: maybe will be better with pathfinder?

https://gyazo.com/fa735185bcfd85ffae1912a3f8859dbb
B
14
S
6
Posts: 63
Reputation: 1,236

Post » Mon Apr 25, 2016 11:49 am

R0J0hound wrote:Here's an idea. You can use the bullet behavior to move the people and the LOS behavior to pick a node to move to.
https://dl.dropboxusercontent.com/u/542 ... _walk.capx


I got it:

https://gyazo.com/2eb18ee12aec48edce7d364d556a3377

but sometimes when there are more than 1 guy walking they got bugged circling:

https://gyazo.com/20d8887386a194bffd552007b3716c3d
B
14
S
6
Posts: 63
Reputation: 1,236

Post » Mon Apr 25, 2016 4:47 pm

@imothep85
To keep them from overlapping each other it's the same solution as with the pathfinding behavior:
how-do-i-chipmunks-span-class-posthilit-rts-span_p978390?#p978390

@ElChuchis
It's hard to see with those gifs but the way I had it setup is the LOS behavior had a range of about 200. So the waypoints should be less than 200 pixels apart. If a dude hits a waypoint and it can't find another waypoint in LOS within 120 degrees of the direction it won't get a new target, so it will orbit it's last target.
In mine I also made the bullet behavior bounce off solids to avoid cutting through the buildings. In your gifs that looks to be happening.
B
91
S
31
G
103
Posts: 5,234
Reputation: 67,754


Return to How do I....?

Who is online

Users browsing this forum: Apollo14, ivanski1983, KTML5 and 5 guests