Hit by Bullet

Description

The Hit by Bullet behavior will trigger an event once your object has been hit by a bullet from a specified "Shoot" behavior. 

This behavior will Trigger an event once each time the bullet hits your object. 

 

Properties

Triggers Once on Event

Object A

This is the object you want to monitor to see if it has been hit by a bullet. By default this is the current object selected. You can change this to any other object in your scene. 

Select Shoot Behavior

Select a Shoot behavior from any object in your scene. This is the behavior you will specifically be monitoring to see if it has shot your selected object.

Play Anmation

When this toggle is on, your selected object will play an animation each time a bullet impacts your object.

Custom Animations

On the left panel you can select an animation cycle to play when you press the shoot button.

Animation Priority

On the left Custom Animations panel, you can prioritize your shoot animations so it does not conflict with another playing animation. The animation system will play a cycle with a higher priority. So if another animation behavior is interrupting your shoot animation, try increasing the priority.

 

 

Outputs

Object ID

This outputs the Object ID.


Examples
 

If you want a characters health to go down when it is shot, you can use this behavior to see if it has been shot and decrease the health. 

 

Related

Ignore Bullet

Shoot

Shoot with Button

 

HitByBullet.gif

0 Comments

Article is closed for comments.