[Include] rTurret - Easily create interactive turrets!
#21

Update: Version 1.5

This update requires the ColAndreas plugin for the new LoS features.

Turrets now have LoS capabilities! To enable, simply set your turret behavior to one of the aiming behaviors. By default, turrets with aiming behaviors will shoot only if there is a line of sight to a player. For all behaviors, bullets no longer go through walls and will collide with solid objects if there are any in their path (this can be disabled with the ToggleTurretLOS function). Special thanks to the creators of ColAndreas for making this possible!

Improved predictive aim algorithm, as a result predictive aim is now enabled by default for aim behaviors. Several other toggle defaults have been changed. Check the front page for a detailed list.

Added Turret Health system. Health is turned off by default. When toggled on, health will automatically deplete if the turret is shot and will be destroyed once health reaches 0. See updated filterscript for example usage:
  • Float:GetTurretHealth(turretid);
  • SetTurretHealth(turretid, Float:health);
  • ToggleTurretHealth(turretid, toggle, Float:sethealth = -1.0);
  • OnPlayerShootTurret(playerid, weaponid, turretid, Float:fX, Float:fY, Float:fZ);
  • OnTurretDeath(turretid, killerid, weaponid);
Added LoS features:
  • ToggleTurretLOS(turretid, toggle);
    • Toggle whether the turret's bullets will end its path against a solid object
  • ToggleTurretLOSAim(turretid, toggle);
    • Applicable to aim behaviors only, toggles whether the turret will shoot once there is a line of sight to a player, otherwise will remain inactive. Must have turret LoS toggled on.
  • OnTurretBulletCollision(turretid, Float:x, Float:y, Float:z);
    • Called when a bullet collides with a solid object.

Bug fixes/tweaks:
  • Eliminated invalid streamer id console spam which were just false positives (hopefully)
  • Improved predictive aiming.
  • Increased default bullet area radius for improved accuracy.
  • Fixed a bug where turrets with 3d aiming would miss their shots at an idle player
  • Due to bullet hit inaccuracies with idle players, idle players will now instantly lose health instead of a physical bullet being created, assuming the turret has a targeting behavior.
Download:
v1.5 Pastebin
v1.5 Example filterscript
Reply


Messages In This Thread
rTurret - Highly customizable turrets! - by Corekt - 15.07.2014, 03:50
Re: rTurret - Easily create interactive turrets! - by MehranGta - 15.07.2014, 04:34
Re: rTurret - Easily create interactive turrets! - by iRaiDeN - 15.07.2014, 04:54
Re: rTurret - Easily create interactive turrets! - by Team_PRO - 15.07.2014, 05:06
Re: rTurret - Easily create interactive turrets! - by Niko_boy - 15.07.2014, 05:09
Re: rTurret - Easily create interactive turrets! - by R0 - 15.07.2014, 22:09
Respuesta: rTurret - Easily create interactive turrets! - by CuervO - 16.07.2014, 03:59
Re: rTurret - Easily create interactive turrets! - by Arroway - 16.07.2014, 05:07
Re: Respuesta: rTurret - Easily create interactive turrets! - by Corekt - 16.07.2014, 16:30
Re: rTurret - Easily create interactive turrets! - by StreetGT - 16.07.2014, 16:36
Re: rTurret - Easily create interactive turrets! - by Corekt - 19.07.2014, 23:16
Re: rTurret - Easily create interactive turrets! - by iFarbod - 22.07.2014, 13:28
Re: rTurret - Easily create interactive turrets! - by DemME - 24.07.2014, 23:39
Re: rTurret - Easily create interactive turrets! - by Onfroi - 28.06.2015, 02:16
Re: rTurret - Easily create interactive turrets! - by Crayder - 28.06.2015, 02:32
Re: rTurret - Easily create interactive turrets! - by Onfroi - 28.06.2015, 03:00
Re: rTurret - Easily create interactive turrets! - by Sellize - 28.06.2015, 10:54
Re: rTurret - Easily create interactive turrets! - by Gasman - 28.06.2015, 12:49
Re: rTurret - Easily create interactive turrets! - by Konverse - 29.06.2015, 06:04
Re: rTurret - Easily create interactive turrets! - by Corekt - 30.06.2015, 00:15
Re: rTurret - Highly customizable turrets! - by Corekt - 01.07.2015, 06:48
Re: rTurret - Easily create interactive turrets! - by Corekt - 02.07.2015, 20:50
Re: rTurret - Easily create interactive turrets! - by liquor - 03.07.2015, 04:11
Re: rTurret - Easily create interactive turrets! - by Corekt - 03.07.2015, 17:29
Re: rTurret - Easily create interactive turrets! - by Onfroi - 09.07.2015, 21:38
Re: rTurret - Easily create interactive turrets! - by Corekt - 18.07.2015, 20:52

Forum Jump:


Users browsing this thread: 1 Guest(s)