Forum

> > CS2D > Scripts > projectile cmd not spawning gun shots
Forums overviewCS2D overview Scripts overviewLog in to reply

English projectile cmd not spawning gun shots

2 replies
To the start Previous 1 Next To the start

old projectile cmd not spawning gun shots

Coolhand
User Off Offline

Quote
I was editing the customizable turrets script and this happened
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
["bulletturr"] = {
				name = "M142 turret";
				projid = 90; 
				health = 300; 
				price = 10000;
				gfx = "gfx/mafia_man/mm1/turretgun.bmp";
				
				shootself = false;
				
				range = 240;
				flydist = 240;
				
				shoot_delay = 80;
				aim_delay = 100;
				
				explode = true;
				exp_size = 100;
				exp_damage = 75;
				
				f_if = nil;
				f_if = function(id)
					if player(id, "health") < player(id, "maxhealth") then
						return true
					else
						return false
					end
				end; ]]
			};

Then i tested it and in case of shooting minigun bullets is throwed constantly the item in case of its proyectile.

Im newbie in lua so dont be rude in the comments.

So, you can help me fix it?

Admin/mod comment

"Lua error" is far too generic as title. Please think of better titles in future. Fixed /DC

old Re: projectile cmd not spawning gun shots

Avo
User Off Offline

Quote
Yeah, Miku's right. Read the reference:
cs2d cmd spawnprojectile has written
CS2D will let a regular item fly if the selected item ID does not have a corresponding projectile (no yellow P in the list above). The item will then be collectible as soon as it has hit the ground and doesn't move anymore
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview