addObject function to gunswitcher