richochet

Just started using Construct 2? Post your questions here

Post » Fri Mar 07, 2014 10:24 pm

I am making a top down shooter and when a bullet hits a wall I want to make it ricochet once and then be destroyed. How do I make that happen?
B
6
S
1
Posts: 47
Reputation: 759

Post » Fri Mar 07, 2014 11:33 pm

Well, my first question is how far do you want it to go after it ricochets?
B
20
S
7
G
7
Posts: 88
Reputation: 4,152

Post » Sat Mar 08, 2014 12:33 am

two ways I can think of

method 1 - give your bullet an instance variable set to 0. on collision with a wall add 1 to this instance variable. then when the instance variable gets to your limit (in this case 2) destroy it.this method destroys the bullet on second hit (in this case)

method 2 - give your bullet a fade behaviour set to a low fade out of something like 0.25 and not active at start. on collision with wall start fade...you could also add a particles effect for the bullet strike
You do not have the required permissions to view the files attached to this post.
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Sat Mar 08, 2014 11:40 am

use bounce bullets and than destroy it with instance variables if you don't know about instance variables than check this tutorial
https://www.scirra.com/tutorials/806/instance-variable
B
257
S
43
G
15
Posts: 1,992
Reputation: 41,535

Post » Fri Mar 14, 2014 5:52 pm

thanks very much
B
6
S
1
Posts: 47
Reputation: 759


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 3 guests