How do I create a missile defense system?

Just started using Construct 2? Post your questions here

Post » Fri Jan 19, 2018 6:16 pm

Hello everyone,
I am currently trying to simulate the interception of ballistic missiles with anti-ballistic missiles.
The problem is, the ABMs(anti-ballistic missiles) have unpredictable behaviors, they're slow in finding a path, missing their target entirely and for some odd reason all drain down at point 0,0 on the map.


Is path-finding not suitable for high speed tracing?
What else can I do?

Thanks :)
B
6
Posts: 17
Reputation: 289

Post » Fri Jan 19, 2018 7:11 pm

Update : I've been trying to use a Turret vs Turret situation, but once the bullets collide the event in which they are both destroyed is never triggered.. ?
B
6
Posts: 17
Reputation: 289

Post » Sat Jan 20, 2018 4:09 am

Turret with predictive aim should work much better than path finding.
If your bullets are small and moving fast, they can pass through each other "in between frames", faster than the system can detect collision.
You can try making their collision polygons bigger.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
129
Posts: 1,799
Reputation: 68,923

Post » Sat Jan 20, 2018 7:33 am

@dop2000,
Thank you for your reply,
I was able to solve the collision event by enlarging the pixels significantly.
However, my counter-turret is acting not as expected. It shoots bullets in random directions or way off from the target.
Predictive aiming doesn't work, it attempts to shoot something off-screen when there is nothing waiting there.


Screenshot of eventsheet
Code: Select all
https://imgur.com/uHbZNfk
B
6
Posts: 17
Reputation: 289

Post » Sat Jan 20, 2018 8:58 am

Try adding these actions before the "AAAT acquire target":

AAAT clear turret targets
System Wait 0

If this doesn't help, could you share your capx?
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
129
Posts: 1,799
Reputation: 68,923

Post » Sat Jan 20, 2018 9:47 am

dop2000 wrote:Try adding these actions before the "AAAT acquire target":

AAAT clear turret targets
System Wait 0

If this doesn't help, could you share your capx?


I have decided to change my approach on this,
I have created a blank sprite that is spawned by mouse double-clicking, when it is spawned, the counter-turret fires a missile at it.
The player is meant to intercept the enemy's missile by manually calculating its trajectory.

Hopefully I can add physics now..

If you know anything about missile physics implementation into CS2 I'd appreciate it .

New event sheet
Code: Select all
https://imgur.com/pP074bG
B
6
Posts: 17
Reputation: 289

Post » Sat Jan 20, 2018 10:07 am

You can add gravity to Bullet behavior, don't need physics for that.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
129
Posts: 1,799
Reputation: 68,923


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 6 guests