Velocity
Applies a force to an entity, pushing them in a direction.
Applies a velocity (a push or force) to an entity. Unlike teleport, this respects physics and creates a natural movement arc.
Configuration
- Target: The entity to apply velocity to.
- Operation:
Set: Overwrites the entity's current velocity.Add: Adds to the entity's current velocity.
- Vector (X, Y, Z): The direction and magnitude of the force.
- Y is vertical (positive is up).
- X and Z are horizontal.
Example
Create a knockback effect when a player is hit.
- Event:
Player Hit Player - Action:
Velocity- Target:
Target Player(the one who was hit). - Operation:
Add - Vector: Use the
Attacker's look direction from the event data, and multiply it by a negative value to push the victim away from the attacker. This requires using properties to store and manipulate vector data.
- Target: