Jump to content

Turrets


HAL9000

Recommended Posts

Hal is it possible to make it so the turret only kills zombies

as I like to use it on my server without killing all the players :playful:

 

Hello oakraven,

 

Have a look in the script folder in the mod. Open up TurretScript.cs and look for this code

 

       foreach (EntityPlayer p in GameManager.Instance.World.Players.list)
       {

           if (p.EntityName == OwnerName)
               continue;

           if (Vector3.Distance(p.transform.position, gameObject.transform.position) < attack.Range)
           {

               if (OwnerEntity == null || !(p == OwnerEntity || p.IsFriendsWith(OwnerEntity)))
                   players.Add(p);
           }
       }

 

Remove that code and rebuild the mod. It will then ignore players

Link to comment
Share on other sites

Thank you Hal that worked :panda:

Is there a way to add a on/off switch to the turret instead of removing the gas to stop it.

:love_heart:

 

Not currently. Maybe when TFP add electricity in but there's no way to alter the meta tags yet. I suppose it could be done through a custom item action. If I do another update for this mod I'll have a look but I've no plans to at the minute.

Link to comment
Share on other sites

  • 7 months later...

Just done a test the turret works good but the shooting sound keeps playing nonstop

i removed the gas and the 9mm and removed the turret but the sound still keeps playing

only way to stop it is to reload the game

i do get a error when i build the mod

ERROR:No assembly from Buildandrunpatchmods task :nevreness:

Link to comment
Share on other sites

Hi Hal,

 

Great to see this mod back in action!

 

Anyone able to shed some light on this compilation error:

 

c:\Users\Grumbul\Downloads\003...SDX_0.7.0\Targets\7DaysToDie\Mods\HalTurret\Scripts\TurretScript.cs(610,13): error CS1501: No overload for method 'Play' takes '3' arguments

c:\Users\Grumbul\Downloads\003...SDX_0.7.0\Targets\7DaysToDie\Mods\HalTurret\Scripts\TurretScript.cs(857,13): error CS1501: No overload for method 'Play' takes '3' arguments

ERROR: Failed to compile Mods.dll

ERROR: Task Compile mod scripts failed

Link to comment
Share on other sites

  • 2 months later...

The A15 download link for the Turrets is not working for me. This is the error i'm getting:

 

Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

Apache/2.2.15 (CentOS) Server at http://www.vendocode.com Port 80

Link to comment
Share on other sites

The A15 download link for the Turrets is not working for me. This is the error i'm getting:

 

Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

Apache/2.2.15 (CentOS) Server at http://www.vendocode.com Port 80

 

Fixed, thanks for the heads up

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...