Multiple Ammo system

Hello, everyone. In my game the player can shoot a variety of bullets and ammo with different abilities. The problem is I’m not sure how to make an appropriate python script to change from bullet to bullet. If anyone could throw me a bone I’d appreciate it. :smiley:

You dont neccesarily need python, here is a tutorial that i did on how to switch between ammo’s with a few logic bricks https://www.youtube.com/watch?v=U5cHn3FTGAM

on gun firing

Bullet = bge.logic.getCurrentScene().addObject[own[‘AmmoType’]]

will add any object you name in the property as a string

like if own[‘AmmoType’]= ‘laser’

it will attempt to add a object named laser from a hidden layer,

I made a system for managing weapons, and the guns have a property called projectile that I use to manage ammo, reloading, and adding the projectile,

you could change the property in game using logic or python.