Forum

> > CS2D > Scripts > Any simple zombie mod health/knockback scripts?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Any simple zombie mod health/knockback scripts?

5 replies
To the start Previous 1 Next To the start

old Any simple zombie mod health/knockback scripts?

MrKofficial
User Off Offline

Quote
FIXED


All of the zombie scripts I could find have extra items, ammo packs, different zombie classes which I don't want.

Are there any simple scripts to adjust zombie health and knockback when shot?

For example zombies have 50k health, but the knockback is bigger than in all of the zombie plague scripts.

EDIT: I configured a Lua script to my liking, the issue is now solved!
edited 2×, last 17.11.17 08:01:42 pm

old Re: Any simple zombie mod health/knockback scripts?

MrKofficial
User Off Offline

Quote
@user Gaios: Yeah I got a knockback script but just knockback script doesn't work... the zombies die so fast.


I setup one of the zombie plague plugins but only BOTS can infect people and choose class which is weird... Users only do 5 DMG and can't pick a class.

I don't know how to setup anything...

old Re: Any simple zombie mod health/knockback scripts?

Devil-Thanh
GAME BANNED Off Offline

Quote
Here is a simple code that work perfectly
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
29
30
31
32
33
34
35
36
count = {}
dir = {}
for i = 1, 32 do
     count[i]=0
     dir[i] = 0
end

addhook("hit","hit")
function hit(id,od)
	if (player(id,"team") == 1) and (player(od,"team") == 2) then
		dir[id] = player(od,"rot")
		count[id] = 3
	end
end

function getpos(x, y, dir, speed)
	return x + math.sin(math.rad(dir)) * speed, y + -math.cos(math.rad(dir)) * speed
end

addhook("always","always")
function always()
for id = 1,32 do
	if player(id,"exists") then
		if player(id,"health")>0 and count[id] > 0 then
			local x, y = getpos(player(id,"x"), player(id,"y"), dir[id], 26)
			if tile(math.floor(x/32), math.floor(y/32),"walkable") then
				x, y = getpos(player(id,"x"), player(id,"y"), dir[id], 10)
				parse("setpos "..id.." "..x.." "..y)
				count[id] = count[id] - 1
			else
				count[id] = 0
			end
		end
	end
end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview