Page 1 of 1

Reduce bullet speed on impact

PostPosted: Sun Oct 20, 2013 10:43 pm
by drstark
If I have a projectile with the bullet behavior and I want to reduce it's speed by say 10% anytime it collides with an object how would i do it?

I'm basically throwing a rock in a platformer game, and this is the only object in the game with any sort of physics.

Re: Reduce bullet speed on impact

PostPosted: Sun Oct 20, 2013 11:26 pm
by mindfaQ
rock on collison with object - set rock bullet speed to rock.bullet.speed*0,9
this?

Re: Reduce bullet speed on impact

PostPosted: Sun Oct 20, 2013 11:40 pm
by drstark
Would that work on all solid objects, or would I have to set that for each object it could collide with?

Re: Reduce bullet speed on impact

PostPosted: Mon Oct 21, 2013 7:06 am
by AngelEyes
@drstark, you would need to set up events for each object the rock would collide with. I suggest you use families. Put all the objects you want to throw the rock at in the family, and then you can just create a single event for when the rock collides with the family. In case you are not aware, families are in the licensed versions only.