GameCreator Shooter Basic Setup

GameCreator's Shooter module is designed for complex characters but it's possible to build simpler elements like those you would find in a bullet hell game. Here's the recipe to make it happen!

Setup GameCreator Shooter Module

If you don't already have it setup, download the package and use the Module Manager to install the Shooter module.

Module Manager

This will give you access to the triggers, actions and asset types we need.

Desired items in Quick Search list

Create Basic Ammo

First we'll describe the Ammo by making a new Ammo item with Assets/Create/Game Creator/Shooter/Ammo.

For this scenario, we want the bullets to be clearly visible as well as slow (relatively) so that players can see them travel. This means we need to set it up as Projectile. It'll also need a visual representation so create any prefab and assign it using the Inspector. I used a red sphere.

Ammo Inspector values

Since this is going to be fired from a simple inorganic character, all bone-based character properties are collapsed in the images.

Create Basic Weapon

Next, we build the weapon that will be used with Assets/Create/Game Creator/Shooter/Weapon. Assign the Basic Ammo to the Basic Weapon.

Weapon Inspector

The next part is tricky. GameCreator's Weapons assume that a visual representation of the weapon exists. This can be worked around by using a Prefab that's an empty GameObject but it'll need a Muzzle component attached for vector calculation of the ammo's projectile. 

Add Shooter Character

Create a GameObject tree to represent the shooter. The essential components are Character Shooter and a trigger and action to make the shot. Here's what I did.

  • Add a Shooter Character component to the Game Object along with two Triggers
    Inspector of shooter
  • Set the first trigger to On Start trigger and assign an Action.
    On Start Action

    The action can be set such that it:
    • Draws the Basic Weapon with Basic Ammo
    • Aims down the muzzle
  • Set the other trigger to On Draw Weapon and add a second action.
    Shooter Action

    This will run a basic Shooting Action that:
    • Rotates the shooter to a desired target (I randomly pick from a list of positions but it could just as well be a player, moving target, etc)
    • Shoots a Single bullet
    • Repeats the action

Adding the Missing Element

At this point, you may notice projectiles are added to scene BUT they are not moving. This is because Projectile type ammo needs a Rigid Body component in order for the correct force to be applied and cause motion. Mosey on back to the Projectile prefab and add a Rigid Body component. Turn off gravity if desired. I now have a spinning shooting turret-like thing.

Spinning Shooting Shooter

If your bullets are too slow, find the Projectile Velocity property in the Ammo asset and increase it. It's under Aiming in my current version but I needed Crosshair mode set in order to see it. You can toggle it back to None once you have a happy value.

You may also notice the bullet might be shifted...sometimes. This is because of collision relationships between the shooter and the projectile and how in this scenario, the projectiles are created inside the shooter. Conventionally, the muzzle/weapon is far away from the body of the shooter so such penetrations shouldn't happen. You can use the Weapon prefab position to create such an offset. Alternatively you can disable the shooter's collisions or just ensure projectiles and shooters don't mix using the Collision Layer Matrix feature.

Conclusion

Once you build the basic elements, it's easy to create variations and develop complex behaviors. With features in other modules like Perception and Line of Sight checks, shooters can be given advanced behaviors that can emulate intelligence.