Shot Functions

```
**Creates** a **bullet** of the **type** defined. **Sound** and **Delay** are optional. **Delay** is the time the spawning animation will take. Set **Sound** to **"0"** if you want to use **Delay** but have **no sound**.

If no **Delay** time is provided it will use the default set with **shotSetDefaultDelay**.

**Returns** it's ID

### **ShotCreateA**

```
Arguments:
     1. Type
     2. x
     3. y
     4. Speed
     5. Direction
     6. Step Speed Change
     7. Final Speed
     8. [optional] Speed Change Delay
     9. [optional] Sound
     10. [optional] Delay

```
Creates a bullet who's **speed will start** at the **Speed** argument and **increment every step** by the **Step Speed Change** until it reaches the **Final Speed**. Speed Change Delay will add a delay before the Step Speed Change gets added.

**Returns** it's ID

### **ShotCreateCircle**

```
Arguments:
     1. Type
     2. x
     3. y
     4. Speed
     5. Direction
     6. Amount
     7. Distance From Center
     8. [optional] Sound
     9. [optional] Delay

```
Creates a **Group of bullets** in a **circle** of the **Amount** you've set. They get spawned in at the **Distance From Center** (x,y) in the **Direction** they will move.

**Returns** the group ID

### **ShotCreateCircleA**

```
Arguments:
     1. Type
     2. x
     3. y
     4. Speed
     5. Direction
     6. Amount
     7. Distance From Center
     8. Step Speed Change
     9. Final Speed
     10. [optional] Speed Change Delay
     11. [optional] Sound
     12. [optional] Delay

```
This is the same as **shotCreateCircle** and **shotCreateA**. You can create a circle group of bullets with acceleration/deceleration.

**Returns** the group ID

### **ShotCreateArc**

```
Arguments:
     1. Type
     2. x
     3. y
     4. Speed
     5. Direction
     6. Amount
     7. Spread
     8. Distance From Center
     9. [optional] Sound
     10. [optional] Delay

```
Creates an **arc of bullets** with the **center** of the arc in the **Direction** specified. The **Spread** argument is how many degrees the arc will be (45 will be an arc 1/8th of a circle).

**Returns** the group ID

### **ShotCreateArcA**

```
Arguments:
     1. Type
     2. x
     3. y
     4. Speed
     5. Direction
     6. Amount
     7. Spread
     8. Distance From Center
     9. Step Speed Change
     10. Final Speed
     11. [optional] Speed Change Delay
     12. [optional] Sound
     13. [optional] Delay

```
This is the same as **shotCreateArcA** and **shotCreateA**. You can create an arc group of bullets with acceleration/deceleration.

**Returns** the group ID

### **ShotCreateCLaserCircle**

```
Arguments:
     1. Type
     2. x
     3. y
     4. Speed
     5. Direction
     6. Amount
     7. Length
     8. Width
     9. Distance From Center
     10. [optional] Sound

```
Creates a **circle** of **Curving Lasers**.

**Returns** the group ID

### **ShotCreateCLaserCircleA**

```
Arguments:
     1. Type
     2. x
     3. y
     4. Speed
     5. Direction
     6. Amount
     7. Length
     8. Width
     9. Distance From Center
     10. Step Speed Change
     11. Final Speed
     12. [optional] Speed Change Delay
     13. [optional] Sound

```
Creates a **circle** of **Curving Lasers** with **acceleration arguments** (same as A shots above).

**Returns** the group ID

### **ShotCreateCLaserArc**

```
Arguments:
     1. Type
     2. x
     3. y
     4. Speed
     5. Direction
     6. Amount
     7. Spread
     8. Length
     9. Width
     10. Distance From Center
     11. [optional] Sound

```
Creates a **circle** of **Curving Lasers**.

**Returns** the group ID

### **ShotCreateCLaserArcA**

```
Arguments:
     1. Type
     2. x
     3. y
     4. Speed
     5. Direction
     6. Amount
     7. Spread
     8. Length
     9. Width
     10. Distance From Center
     11. Step Speed Change
     12. Final Speed
     13. [optional] Speed Change Delay
     14. [optional] Sound

```
Creates a **circle** of **Curving Lasers** with **acceleration arguments** (same as A shots above).

**Returns** the group ID

### **ShotCreateSLaser**

```
Arguments:
     1. Type
     2. x
     3. y
     4. Direction
     5. Length
     6. Width
     7. Duration
     8. [optional] Sound
     9. [optional] Delay

```
Creates a **circle** of **Curving Lasers** with **acceleration arguments** (same as A shots above).

**Returns** it's ID

## Bullet Deleters

### **DeleteShotAll**

```
Arguments:
     1. DeleteType

```
Deletes all bullets. The **Delete Types** are:

```
DELTYPE_INSTANT - Deletes the bullet instantly, no death animation

DELTYPE_ANIMATED - Deletes the bullet with it's death animation

DELTYPE_ITEM - Deletes the bullet with it's death animation and spawns in an item
```
This **deleter** lasts for **30 frames**, will delete shots up to **100 resist** and covers the **play area + 128** over the edges.

**Returns** ShotDeleter ID

### **DeleteShotCircle**

```
Arguments:
     1. x
     2. y
     3. Radius
     4. [optional] Timer
     5. [optional] Delete Type
     6. [optional] Type of Bullets (-1 all)
     7. [optional] Color of Bullets (-1 all)
     8. [optional] Parent Object ID (-1 all)

```
Creates a Bullet Deleter. **Timer** will set how long it lasts for (default 1 frame). **Delete Type** is the same as **DeleteShotAll**. **Type of Bullets** is the bullet type (example, **BALL\_M**). **Color of Bullets** will delete a **certain color**. **Parent Object ID** will delete bullets made by a **certain enemy**.

**Returns** ShotDeleter ID

### **DeleteShotRectangle**

```
Arguments:
     1. x
     2. y
     3. Width
     4. Height
     5. [optional] Timer
     6. [optional] Delete Type
     7. [optional] Type of Bullets (-1 all)
     8. [optional] Color of Bullets (-1 all)
     9. [optional] Parent Object ID (-1 all)

```
**Returns** ShotDeleter ID

### **DeleteShotSetXY**

```
Arguments:
     1. ShotDeleter ID
     2. x
     3. y

```
Sets the X and Y coordinates for the ShotDeleter. This is useful for following an object to wipe bullets away.

**Returns** True/False if shot exists

### **DeleteShotSetAngle**

```
Arguments:
     1. ShotDeleter ID
     2. Angle

```
Sets the **Angle** of a Rectangle shot deleter

**Returns** True/False if shot exists

### **DeleteShotSetResist**

```
Arguments:
     1. ShotDeleter ID
     2. Resist

```
Sets the **Resist** deletion threshold. Default is 0 for deleters and bullets.

**Returns** True/False if shot exists

### **DeleteShotSetRadius**

```
Arguments:
     1. ShotDeleter ID
     2. Radius

```
Sets the **Radius** of a Circle shot deleter

**Returns** True/False if shot exists

### **DeleteShotExists**

```
Arguments:
     1. ShotDeleter ID

```
Checks if the ShotDeleter exists

**Returns** True/False if shot exists

### **DeleteShotDelete**

```
Arguments:
     1. ShotDeleter ID

```
Deletes the ShotDeleter

**Returns** True/False if shot exists

### **DeleteShotDeleteAllDeleters**

```
Arguments:
     None

```
Deletes all ShotDeleters (except the players hitbox, yes that is one)

**Returns** N/A

## Bullet Manipulation

### **ShotSetDirection**

```
Arguments:
     1. Instance
     2. Direction

```
Sets the direction of the bullet

**Returns** True if successful

### **ShotSetSpeed**

```
Arguments:
     1. Instance
     2. Speed

```
Sets the speed of the bullet

**Returns** True if successful

### **ShotAddDirection**

```
Arguments:
     1. Instance
     2. Direction to add

```
Adds this amount to a shots direction

**Returns** True if successful

### **ShotAddDirectionPersistent**

```
Arguments:
     1. Instance
     2. Direction to add

```
Adds this amount to a shots direction every frame

**Returns** True if successful

### **ShotSetCollision**

```
Arguments:
     1. Instance
     2. True/False

```
Turns collision checks for a bullet on of off

**Returns** True if successful

### **ShotGroupDeleteBullet**

```
Arguments:
     1. Group ID
     2. Bullet Number

```
Deletes a bullet in the shot group

**Returns** True if successful

### **ShotGroupSetSpeed**

```
Arguments:
     1. Group ID
     2. Bullet Number (-1 for all)
     3. Speed

```
Sets the speed of the bullet (or all in group if -1)

**Returns** True if successful

### **ShotGroupSetDirection**

```
Arguments:
     1. Group ID
     2. Bullet Number (-1 for all)
     3. Direction

```
Sets the direction of the bullet (or all in group if -1)

**Returns** True if successful

### **ShotGroupSetDirectionPoint**

```
Arguments:
     1. Group ID
     2. Bullet Number (-1 for all)
     3. x
     4. y

```
Points each bullet towards the given x and y

**Returns** True if successful

### **ShotGroupDeletePattern**

```
Arguments:
     1. Group ID
     2. live
     3. delete

```
Deletes bullets in the shot group in a pattern. If you do 2 live, 3 delete it will leave 2 alive, 3 deleted, 2 alive, 3 deleted etc until it reaches the end of the group

**Returns** True if successful

### **ShotGroupReplaceAll**

```
Arguments:
     1. Group ID
     2. Type

```
Replaces the bullet group with a new group. The bullets will be in the same position as the old bullets and have the same attributes (other than type and color)

**Returns** New group ID

## Misc

### **ShotSetDefaultDelay**

```
Arguments:
     1. Time

```
Sets the default spawn in animation delay for shots. Default is 10

**Returns** N/A

### **ShotAutoDeleteEdges**

```
Arguments:
     1. Left
     2. Top
     3. Right
     4. Bottom

```
Sets the auto delete point for shots. Default is 64 for all.

**NOTE:** They're automatically placed relative to the edges so 64 on the left would be automatically -64. 64 on the bottom with the screen height of 448 would automatically be 512.

**Returns** N/A

### **SetBulletItem**

```
Arguments:
     1. Type
```
Sets the item bullets drop when they're deleted with DELTYPE\_ITEM. This is a global setting.

**Returns** N/A

### **ShotSetBlend**

```
Arguments:
     1. Instance
     2. Blend Type (bm_normal, bm_add, bm_max, bm_subtract)
```
Sets the Blend Mode for the bullet/laser.

**Returns** N/A

### **ShotSetResist**

```
Arguments:
     1. Instance
     2. Resist value
```
Sets the **resist** value for a shot. Any deleter with <= resist value will be able to delete it.

**Returns** N/A

### **ShotSetParent**

```
Arguments:
     1. Instance
     2. Parent
```
Sets the **Parent** for a shot. This is generally an instance that 'created' it but technically can be any number. Deleters with the same Parent will be able to delete it.

**Returns** N/A

### **ShotAutoDelete**

```
Arguments:
     1. Instance
     2. True/False (on/off)
```
Sets if the shot should auto delete off the play field or not

**Returns** N/A

### **ShotGetType**

```
Arguments:
     1. Instance
```
Gets the type of shot

**Returns** Shot Type

### **ShotGetSpeed**

```
Arguments:
     1. Instance
```
Gets the speed of the shot

**Returns** Shot Speed

## Adding Shots

### **ShotAddCircle**

```
Arguments:
     1. Sprite
     2. Subimage
     3. Color
     4. Radius (hitbox)
     5. Draw Rotated
     6. Draw Rounded (round x, y)
     7. Animation Frames [optional]
     8. Animation Speed [optional]

```
With this function you can import **circle bullets** easily.

Input a **sprite** you've already imported, set the **sub-image** and **color** (used for shot death animation). **Radius** is the hitbox size.

**Draw Rotated** will be the draw angle relative to the direction the bullet is facing. For example if a shot is pointing up (90 deg) in the shotsheet, set it to 270 so it's drawn pointing towards 0 (relative to the shot bullet direction). Use -1 to ignore this.

**Draw Rounded** will round the x,y of the drawn sprite (not the x,y of the bullet itself, only the drawn x,y).

**Returns** Bullet ID

### **ShotAddOval**

```
Arguments:
     1. Sprite
     2. Subimage
     3. Color
     4. Width
     5. Height
     6. Draw Rotated
     7. Draw Rounded (round x, y)
     8. Animation Frames [optional]
     9. Animation Speed [optional]

```
With this function you can import **oval bullets**.

**Width** and **Height** are for the hitbox (currently 2 back to back triangles). Think of them relative to how it's being drawn.

An oval on the shot sheet pointing up but with a draw rotation of 270 will want a larger width than height.

**Returns** Bullet ID

### **ShotAddRectangle**

```
Arguments:
     1. Sprite
     2. Subimage
     3. Color
     4. Width
     5. Height
     6. Draw Rotated
     7. Draw Rounded (round x, y)
     8. Animation Frames [optional]
     9. Animation Speed [optional]

```
With this function you can import **rectangle bullets**.

**Width** and **Height** are for the hitbox. Very much the same as above but with a rectangle hitbox.

**Returns** Bullet ID

### **ShotAddCLaser**

```
Arguments:
     1. Sprite
     2. Subimage
     3. Color
     4. Animation Frames [optional]
     5. Animation Speed [optional]

```
With this function you can import **Curving Laser bullets**.

**Warning, this may be expanded upon in future breaking backwards compatibility.**

**Returns** Bullet ID

### **ShotAddSLaser**

```
Arguments:
     1. Sprite
     2. Subimage
     3. Color
     4. Width
     5. Spawn location Sprite
     6. Spawn location Subiamge
     7. Animation Frames [optional]
     8. Animation Speed [optional]

```
With this function you can import **Static Laser bullets**.

Warning, this may be expanded upon in future breaking backwards compatibility.

**Returns** Bullet ID

### **ShotAddDelayLaser**

```
Arguments:
     1. Sprite
     2. Subimage
     3. Animation Frames [optional]
     4. Animation Speed [optional]

```
Adds a **Delay Laser** type

**Returns** Bullet ID

## Delay Lasers

### **ShotCreateDelayLaser**

```
Arguments:
     1. Type
     2. Length
     3. Width
     4. Bullet
     5. Delay

```
**Delay Lasers store other bullets** for a short time and give players a warning laser, letting them know to move.

**Returns** Delay Laser ID

### **DelayLaserAdd**

```
Arguments:
     1. Delay Laser (to add to)
     2. Bullet
     3. Delay

```
**Adds a Bullet to a Delay Laser**. The bullet will reappear when the delay timer reaches 0. You can add as many bullets as you like however adding thousands on a single frame isn't recommended.

**Returns** Delay Laser ID