How to make a 3 parallel projectile shot like

How to make a script that if you shoot a gun, it shoots 2 more bullets at the left and right at the same unit angle.

1 Like

Make a script on the gun with the trigger ‘when this entity (item) is used’ that creates an extra projectile on each side of the gun, like this:

Example code (you will have to change the projectile id to the correct id for your bullet)
@itemIsUsed
createProjectileAtPosition('hGZYvDoFxn', polarProjection(getEntityPosition(thisEntity), 64, entityFacingAngle(thisEntity) - 1.5708 ), 20, entityFacingAngle(thisEntity))
// (optional) sets the source unit of the bullet
setOwnerUnitOfProjectile(lastCreatedProjectile, thisEntity.owner)
// (optional) sets the source item of the bullet
setSourceItemOfProjectile(lastCreatedProjectile, thisEntity)
createProjectileAtPosition('hGZYvDoFxn', polarProjection(getEntityPosition(thisEntity), 64, entityFacingAngle(thisEntity) + 1.5708 ), 20, entityFacingAngle(thisEntity))
// (optional) sets the source unit of the bullet
setOwnerUnitOfProjectile(lastCreatedProjectile, thisEntity.owner)
// (optional) sets the source item of the bullet
setSourceItemOfProjectile(lastCreatedProjectile, thisEntity)
1 Like