The space station is looking filled in but is still missing that extra flair. It’s time to bring in the big guns!
Overview
This lesson will be introducing Weapons and Damageables so players can shoot at targets and see some explosions! It will also introduce using Community Content for some awesome features.
Adding Weapons
Core Content has ready-to-be-used weapons that creators can drag into their scene. There is also a prebuilt Weapon Spawner available in Community Content.
Find the Weapons Catalog
Open the Core Content window and expand the category for Game Components on the left. Then expand the subcategory for Weapons to see the full array of default weapons.
Basic versus Advanced Weapons
Some weapons are prefixed with Basic or Advanced. Advanced weapons have more features such zooming in or multiple attack animations. Basic weapons have minimal components to just have working weapon.
Drag in a Weapon
Choose a weapon and drag it into the scene. Play the game to see the weapon in action. Currently, that weapon can only be picked up by one player and will disappear if the player dies.
Delete the Weapon
In the Hierarchy, delete the weapon template. Once a template has been added from Core Content, it will remain in the Project Content window even if it’s no longer in the scene.
Find a Weapon Spawner
A Weapon Spawner will allow multiple players to access a weapon from an infinite supply.
Open the Community Content window and search for weapon spawner. Find the Weapon Spawner template created by WaveParadigm and click Import.
Add the Weapon Spawner
Once a template has been imported, it can be accessed from the Core Content window.
From Core Content, drag and drop the Weapon Spawner template into the scene. Select the Weapon Spawner object and open the Properties window. From the Project Content window, drag the weapon template into the Weapon custom property.
Add Multiple Weapon Spawns
Repeat the process of adding weapons spawns for multiple types of weapons. Duplicate spawns so they are spread around the combat training building. Also make sure to group all the spawns in a single group to keep the Hierarchy tidy.
Adjusting Spawn and Combat Settings
Currently, the player is not able to respawn if it dies and it can also not harm other players with weapons. This can be changed by adding settings from Core Content.
Add Spawn Points
In Core Content, search for spawn point. Drag and drop a couple Spawn Points around the map for players to start and respawn. Group them all into a group named Spawn Points.
Add Spawn Settings
From Core Content, find the Spawn Settings object and place it in the Gameplay Settings folder within the Hierarchy. Select the Spawn Settings object and open the Properties window. Set the Respawn Delay property to a smaller number like 3.
Add Team Settings
By default, players will join the game all being on the same team.
Find the Team Settings object in Core Content and drag it into the Gameplay Settings folder. Select Team Settings and open the Properties window. Set the Team Mode property to Free For All.
Test in Multiplayer
Creators can test their game with multiple clients from the Core Editor. Click the Multiplayer Preview Mode button next to the Play button at the top of the editor.
Adding Damageables
Damageables are a type of object that can take damage and spawn an effect when they die. There are some default ones created in Core Content.
Add a Damageable Object
Search Core Content for damageable. Drag in the Damageable Crate and Damageable Hazard Barrel into the scene.
Preview the project and shoot the damageables with weapons to see how they work.
Delete the Damageables
In the Hierarchy, delete the damageable objects. Similar to the weapons, the damageable object templates are still available in the Project Content window.
Add a Universal Object Spawner
The damageables will not respawn when they are destroyed. Community Content has a useful template to respawn another template when it gets destroyed. Search for spawner in Community Content and import the Universal Object Spawner by standardcombo.
Add Damageable Spawner
From Core Content, place a Universal Object Spawner into the scene. Select it in the Hierarchy and open the Properties window. Set the Respawn Delay property to 5. Drag and drop the two damageable object templates from the Project Content window into the Template1 and Template2 property.
Preview the Damageables
The damageable object should now respawn randomly as one of the two templates every 5 seconds. Place more Damageable Spawners inside the Combat Training building and remember to use groups to organize the Hierarchy.
Summary
The moon base now has activities for players to do and places to explore!
The fun doesn’t have to stop here because there is so much more to be found in Core Content such as vehicles and animated meshes.
Not to mention, the endless supply of creativity and usefulness found in Community Content.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Strictly Necessary Cookies
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
3rd Party Cookies
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!