Prerequisites:
Everything under The Basics
Optional:
How to add a security console
Overview:
This one's pretty self-explanatory. Adding those annoying gun turrets
is easy, but there are a few things to watch out for.
First, you need to place an auto-turret in your map.
IMPORTANT: be sure to add only AutoTurret or AutoTurretSmall items to your map (available directly under Decoration -> DeusExDecoration). If you add an AutoTurretGun or AutoTurretGunSmall, it will NOT work correctly.
When you first place an auto-turret, it will show up with its base toward the floor. If you want a floor-mounted turret, that's fine, but a more typical placement is on a ceiling. So if you're going for a ceiling mount, be sure to rotate the turret so that it looks like this (its base toward the ceiling):
You'll notice that the gun itself does not show up in the map, but don't worry, it will show up and work just fine when the map is played.
Here's an example of an AutoTurretSmall and an AutoTurret (both ceiling-mounted) in the editor:
Right-click on your turret and expand the AutoTurret category to see and set its properties. Here you can set things like how many rounds of ammo it has, the amount of damage each round does, the range, and the accuracy. These are all straightforward, except for the "titleString" value which appears to be unused.
Unfortunately, there doesn't seem to be a built-in way to override the "hackability" of AutoTurret items. They will always default to "hackable" with a hack strength of 50%.
Finally, you can assign up to three auto-turrets to a security control. The player will be able to set each turret to Bypassed or to attack Allies, Enemies, or Everything. As you might have guessed, you assign a turret to a console by assigning a Tag value to the turret (under Events), and type that value into the turretTag field(s) of the console. See How to add a security console for more info.