dofile_once("data/scripts/lib/utilities.lua")

local shot_id = GetUpdatedEntityID()
local shot_x, shot_y = EntityGetTransform(shot_id)

SetRandomSeed(GameGetFrameNum(), shot_x + shot_y + shot_id)

shot_x = shot_x + rand(-4, 4)
shot_y = shot_y + rand(-4, 4)
local vel_x = rand(-20, 20)
local vel_y = rand(-20, 20)

local projectile = shoot_projectile_from_projectile(shot_id, "data/entities/projectiles/glue.xml", shot_x, shot_y, vel_x, vel_y)