Get drones to navigate around each other [Solved]

Get help using Construct 2

Post » Sun Jun 25, 2017 6:47 pm

There are drones in my game which fly around carry out various tasks, but I'm having problems with them colliding with each other. So I set up an event should make them move away from each other if they get within a certain distance.

It seems to work as expected with only two drones, but when I start adding more I run into a very strange problem. Some drones move away from each other but some don't, and I have no idea why.

http://i1266.photobucket.com/albums/jj5 ... v2uzqq.png
Last edited by Ajbael on Mon Jun 26, 2017 4:41 am, edited 2 times in total.
B
11
S
4
G
4
Posts: 28
Reputation: 2,831

Post » Sun Jun 25, 2017 10:19 pm

Hi,

Nothing collides unless you explain to the game that you want it to collide.
Maybe you have given them certain behavior or made events for them to collide.

A simple solution is to disable their collisions then they will not collide with anything.

Otherwise you don't have to have things solid to collide. You can easily have them not solid and just for the player or enemies create an event of collision with them.

Basically you have some configuration logic error.
Thank you to Construct 2 for giving me the ability to create games without programming knowledge.

My games & gaming portal = DolyGames

If anyone wants to cooperate to help each other Win-Win please email me - I am always happy to discover new opportunities.

Cheers,

COSMOS
B
20
S
9
G
1
Posts: 75
Reputation: 2,152

Post » Sun Jun 25, 2017 11:22 pm

DolyGamesCosmos wrote:Hi,

Nothing collides unless you explain to the game that you want it to collide.
Maybe you have given them certain behavior or made events for them to collide.

A simple solution is to disable their collisions then they will not collide with anything.

Otherwise you don't have to have things solid to collide. You can easily have them not solid and just for the player or enemies create an event of collision with them.

Basically you have some configuration logic error.


Oh they're colliding with each other just fine, that's the problem. I'm trying to get them to navigate around each other, instead of colliding/overlapping. This is a navigation problem, did you look at the events?
B
11
S
4
G
4
Posts: 28
Reputation: 2,831

Post » Mon Jun 26, 2017 1:37 am

if you use path follower behavior you can set it to avoid certain obstacles
B
22
S
12
G
1
Posts: 108
Reputation: 2,774

Post » Mon Jun 26, 2017 4:40 am

So I eventually figured out the issue was that I needed a "For Each Sensor" on the event that sets the sensor's instance variabel Drone_UID. The system show above works just fine now.
B
11
S
4
G
4
Posts: 28
Reputation: 2,831

Post » Mon Jun 26, 2017 10:42 am

Ajbael wrote:So I eventually figured out the issue was that I needed a "For Each Sensor" on the event that sets the sensor's instance variabel Drone_UID. The system show above works just fine now.


Glad you worked it out, good job and good luck! :)
Thank you to Construct 2 for giving me the ability to create games without programming knowledge.

My games & gaming portal = DolyGames

If anyone wants to cooperate to help each other Win-Win please email me - I am always happy to discover new opportunities.

Cheers,

COSMOS
B
20
S
9
G
1
Posts: 75
Reputation: 2,152


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests