Jump to content
Sign in to follow this  
Cernu

return impact point on terrain

Recommended Posts

I would like my player to pick up shot arrows or bolts that hit the ground, and ideally, check if they get destroyed hitting the ground. I think I can manage to do this for arrows and bolts hitting the target (at least I will try), but I have no event for this, unless I miss one. However, I know there is a raycast  that returns on ground hit, and even target hit. Have you people managed to link these two functions, and return the ground hit ?

Share this post


Link to post
Share on other sites

Well, you cannot return a arrow that was missed and ended up on terrain. Altough, maybe vua scrioting you can fake that. So, using a raycast, on groubd hit, you can spawn a new arrow at that position and therefore make it pickable.

  • Thanks 1

Share this post


Link to post
Share on other sites

So I guess in this case I would have to listen for ranged attack, create a raycast or throw, and try to simulate arrow or crossbow. I will give it a try, thanks.

Share this post


Link to post
Share on other sites

However, because bows will get a rework in 1.5, it might be possible to add natively this feature ?

Share this post


Link to post
Share on other sites
12 hours ago, Cernu said:

However, because bows will get a rework in 1.5, it might be possible to add natively this feature ?

Yeah i would wait for it to ve implemented, as we dont know what really is coming up.

 My idea sounded good when written. But now i'm thinking about it, perhaps its not an easy script ?

Share this post


Link to post
Share on other sites

its not easy. I cheated, when the player attacks with ranged attack, he has a little chance to immediately recover an ammunition. Aw well....

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×