Forum

> > CS2D > Scripts > New health value ?
Forums overviewCS2D overview Scripts overviewLog in to reply

English New health value ?

1 reply
To the start Previous 1 Next To the start

old New health value ?

Rainoth
Moderator Off Offline

Quote
Hello everyone. I need some help on how to get new health value. I thought that timer takes new health value every time but it seems it doesn't.
1
2
3
4
5
6
7
8
9
10
11
12
13
elseif class[sour] == 8 then -- Cobra
				if Player[sour].venom > 0 then
					Player[sour].venom = Player[sour].venom - 1
					parse("speedmod "..id.." "..(player(id,"speedmod")-3).." ")
					timer(7000,"parse","speedmod "..id.." "..(player(id,"speedmod")+3).." ")
					timer(4900,"parse","sethealth "..id.." "..(player(id,"health")-1).." ")
					timer(4200,"parse","sethealth "..id.." "..(player(id,"health")-2).." ")
					timer(3500,"parse","sethealth "..id.." "..(player(id,"health")-3).." ")
					timer(2800,"parse","sethealth "..id.." "..(player(id,"health")-4).." ")
					timer(2100,"parse","sethealth "..id.." "..(player(id,"health")-5).." ")
					timer(1400,"parse","sethealth "..id.." "..(player(id,"health")-6).." ")
					timer(700,"parse","sethealth "..id.." "..(player(id,"health")-7).." ")
				end

when hitting player it's supposed to slow him down and make him lose health but instead it turns health back to normal. What happens when fighting :

Deagle does 34 damage and slows down, poison starts taking effect after 0,7 second reducing players health by 7. Then for instance player gets hit again, but instead of poison taking effect further the player gets healed, then it's like deagle damages and poison heals, which makes it kinda pointless...

Another question I have is how to use timers properly ?

old Re: New health value ?

Yates
Reviewer Off Offline

Quote
You can make timers loop as many times as you want.

Just check the CS2D help.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview