Forum

> > CS2D > Mods > Special Weapon.
ForenübersichtCS2D-Übersicht Mods-ÜbersichtEinloggen, um zu antworten

Englisch Special Weapon.

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Special Weapon.

Mikoto
User Off Offline

Zitieren
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.

alt Re: Special Weapon.

Trotskygrad
User Off Offline

Zitieren
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"))))

alt Re: Special Weapon.

Mikoto
User Off Offline

Zitieren
Uh, yes. I mean percentage of maxhealth.

Thanks for help, seems like its exactly what i need.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Mods-ÜbersichtCS2D-ÜbersichtForenübersicht