0
$\begingroup$

I am making somewhat of an FPS, I am making where no bullets come out of the barrel, but a ray comes out. I know how to make a ray with distance and detect a property, but that's not the problem. I am making a penetration system where the ray goes through objects with a certain property ("penetrable"). I can do this, but the way I want this to work is the following: as soon as the ray (first ray) hits a penetrable object, a new ray is created. Also, when the ray hits the property, it casually would send a message ("x") to tell the other player to lose health. If the ray is a ray that is new (penetrated through an object) one, I need it to send the other player a message "xy". This would make it possible to have the bullets deal less damage through walls, and make it possible to reward you differently. So what am I asking for? I would like to have a ray come out of the barrel (if it hits someone before it penetrated, it sends the regular "lose x hp message."), and if it hits a property "penetrable," a new ray would be created that sends players the message "lose x-y" if it hits. I know this sounds very hard, but I can already make it very far; I am just not sure if I am doing this right. Any help is appreciated, thanks!

$\endgroup$

1 Answer 1

1
$\begingroup$

Here is the logic setup for this system :

if ( hit_penetrable and Xray_hit_player ) : send(XY)
if ( hit_player ) : send(X)

enter image description here

a Demo file

$\endgroup$
2
  • $\begingroup$ What does the "body" in the text do? Also, can you make a demo? $\endgroup$
    – blackhole
    Mar 22, 2015 at 18:56
  • $\begingroup$ @BlenderDev the body has no effect for the ligic-blocks, do you want a .blend ? $\endgroup$
    – Chebhou
    Mar 22, 2015 at 19:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .