Files

> > CS2D > Lua Scripts > Customizable Turrets 1.01
Files overviewCS2D overviewLua Scripts overview

English Customizable Turrets 1.01 >

31 comments6 kb, 839 Downloads

old Customizable Turrets 1.01

mafia_man
User Off Offline

╔═══∗ Info

• Author: mafia_man
• Version: 1.01

╠═══∗ Changelog

╠═• 1.01
╠│It's now using tween_rotate which was bugged in earlier cs2d versions.

╠═══∗ Features

• Custom turrets.
• Destroyable turrets.
• Configurable.
• Highly customizable.
• Easy to use.
• Up to 9 turrets because of single menu. (But it can be expanded to infinite)

╠═══∗ Configurable things

• destroyonexit - True/False
╠│If true, then if owner of it will exit buildings will be destroyed.

• gfxbase - Path to graphics
╠│This is image will be drawn under turret barrel.

╠═══∗ Customizable turret fields

• name - String
╠│Name of turret.

• projid - Number (1-91)
╠│Projectile ID - thing which will be shot from turret.
╠│For more information see: cs2d cmd spawnprojectile

• health - Number (1-X)
╠│Health of turret, if it health will reach 0 when shot turrent will be destroyed

• price - Number (0-X)
╠│Price of turret, player have to pay when he builds it.

• gfx - Path to graphics
╠│This image will be drawn as turret barrel.

• shootself - True/False
╠│Depends on gamemode, if it's deathmatch and it's set to true it will only shoot owner of cannon.
╠│And if it's deathmatch and it's set to false then it will shoot everyone but owner.
╠│If gamemode is team based and it's set to true it will only shoot owner team members, else enemies.

• range - Number (0-X)
╠│Range of player detecting.

• flydist - Number (-1, 0-X)
╠│If -1 projectile will fly distance from turret position to player position, else it will use flydist number.

• shoot_delay - Number (1-X)
╠│Delay beetwen shots.

• aim_delay - Number (1-X)
╠│Aiming time (Time for turret to wait since it found player).
╠│It's also be going time for cs2d cmd tween_rotate which doesn't work currently.

• explode - True/False
╠│If true, building will explode when destroyed.

• exp_size - Number (1-X)
╠│Explosion size.

• exp_damage - Number (1-X)
╠│Explosion damage.

• f_if - Function(id, m, t)/Nil
╠│Additional condition for shooting projectile
╠│id - Player ID.
╠│m - Pointer to turret table.
╠│t - Pointer to turret configuration table.
╠│Function should return boolean, True if projectile can be shot or False/Nil if not.

╚═══∗ Conditional function example
1
2
3
4
5
6
7
f_if = function(id, m, t)
	if player(id, "health") < player(id, "maxhealth") then
		return true;
	else
		return false;
	end
end;
edited 6×, last 05.02.14 07:25:18 pm
Approved by Starkkz

Download Download

6 kb, 839 Downloads

Comments

31 comments
Page
To the start Previous 1 2 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

Obviously Exactly Myself
User Off Offline

This is fantastic.

-----

Damn it, I pressed the "Submit" half a dozen times. That spam cooldown seems to function annoyingly.
I like it!

old

-DIE Wolf-
User Off Offline

Best turrets scripts ever!
I like it!

old

G3tWr3ck3d
User Off Offline

Great
I like it!

old

mafia_man
User Off Offline

Factis never finished his script. Also, who cares about who thought the idea?
I can say I thought this idea first back in 2009, when it was impossible for me to make it.
edited 2×, last 14.02.13 09:10:59 pm

old

Dynamite07
User Off Offline

Same question of @user zazz: but nice
I like it!

old

zazz
User Off Offline

Wasn't this @user Infinite Rain: Idea?, anyway.
Nice work over there
I like it!

old

Alpha Beta
User Off Offline

cool stuff.
I like it!

old

Chingy
User Off Offline

This shit is it worth to be liked.
Cool script you did there.
I like it!

old

Avo
User Off Offline

Another custom shit. (y)
I like it!
To the start Previous 1 2 Next To the start