Monday, 16 April 2018

Week 28

This week I have made it so the Gun bullets will destroy on impact, This took a lot of brain ache to figure out how to do it so I will show you all the code I have done to make it destroy on impact and also to make the bullets grey.

This code here is what makes the ammunition destroy on impact, this is to stop having to many entities on the ground which will cause performance issues. I simply added the "DestroyActor" tab and connect the "Event Hit" to it.

While also in this screen for the "FirstPersonProjectile" I changed the size of the ball to be half the size in the scale section to make it more of a "bullet" if you like.
The next thing I did was set the damage of the bullet so that when it hits something with health it will take that amount off of the target, I have set the damage number to be 5, and most of the opponents will have 20 health, with the bigger opponents to have up to 100.
This here is the code to make the damage ratios apply.

No comments:

Post a Comment