Forum

> > CS2D > Mods > Special Weapon.
Forums overviewCS2D overview Mods overviewLog in to reply

English Special Weapon.

2 replies
To the start Previous 1 Next To the start

old Special Weapon.

Mikoto
User Off Offline

Quote
Hello.

I was thinking about special weapons for the server.

Thats is the question:

Normal weapon cause direct damage to your HP.
But is that possible to make it deal x% of damage? I mean, like 'Ignore target's defense'?
For example, 50% of damage means that you will be killed with 2 hits, even you using heavy, medic or super armor.

I am not good in scripting, so, i hope some skilled person can give me the answer.

Thanks.

old Re: Special Weapon.

Trotskygrad
User Off Offline

Quote
erm, if you're talking about damage as a percent of a player's current health then 50% would NOT take 2 hits to kill.

First hit -> 50
Second hit - > 25
Third hit -> 12.5

and so on

however if you're talking about damage as a percentage of maxhealth this could work

1
parse("sethealth "..id.." "..(player(id,"health")-0.5*(player(id,"maxhealth"))))

old Re: Special Weapon.

Mikoto
User Off Offline

Quote
Uh, yes. I mean percentage of maxhealth.

Thanks for help, seems like its exactly what i need.
To the start Previous 1 Next To the start
Log in to reply Mods overviewCS2D overviewForums overview