Author Topic: Rupture  (Read 570 times)

0 Members and 1 Guest are viewing this topic.

Offline Dpulse

  • Major
  • *
  • Posts: 54
    • Not sure what Chop N' Shop is? Visit one of the places above or view this topic!
Rupture
« on: July 21, 2009, 11:26:47 am »
Was wondering if it was possible to make a script where if you got hit by a knife but it doesnt kill you (usually left with 1/4 health ) you would bleed out slowly until you die giving the other player the kill.
Come play with us at chop n' shop soldat!

Chop N' Shop IRC: #CNS.soldat
Chop N' Shop Site: www.CNSS.yolasite.com
Chop N' Shop Server IP: 66.207.3.77 Port: 27079
Not sure what Chop N' Shop is? Visit this topic: http://forums.soldat.pl/index.php?topic=35381.0

Offline iDante

  • Veteran
  • *****
  • Posts: 1967
Re: Rupture
« Reply #1 on: July 21, 2009, 12:10:50 pm »
I dunno if it's possible to tell what weapon was used to do damage, but if you can do that then this is very possible. That is a suggestion for the next scriptcore if it isn't already added (I think it might be), make OnPlayerDamage give the weapon.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Rupture
« Reply #2 on: July 21, 2009, 02:11:31 pm »
This does not the knife check
but if health is <= 40, then it does 3 damage every second
Code: [Select]
const
  BleedHealth = 40;
  BleedDamage = 3;

procedure AppOnIdle(Ticks: cardinal);
var
  i: byte;
begin
  for i := 1 to 32 do
    if (GetPlayerStat(i, 'Active') = true) then
      if (GetPlayerStat(i, 'Health') <= BleedHealth) then
        DoDamage(i, BleedDamage);
end;

slight code change so whomever hurt you last gets the kill if u die due to bleeding
Code: [Select]
const
  BleedHealth = 40;
  BleedDamage = 3;

var
  BleedKill: array[1..32] of byte;

procedure AppOnIdle(Ticks: cardinal);
var
  i: byte;
begin
  for i := 1 to 32 do
    if (GetPlayerStat(i, 'Active') = true) then
      if (GetPlayerStat(i, 'Health') <= BleedHealth) then
        DoDamageBy(i, BleedKill[i], BleedDamage);
end;

function OnPlayerDamage(Victim, Shooter: byte; Damage: integer) : integer
begin
  BleedKill[Victim] := Shooter;
  Result := Damage;
end;

neither of these are tested.

i guess it could be possible to have it so whomever did the most damage to the player gets the kill if they bleed till death; im kind of lazy atm tho

not sure if its possible to check if weapon is knife.. i suppose if u set the damage in weapons.ini to really high, you can check hte Damage, and see if that number is really high; and set the actual damage done to be a certain % of the damage parameter (to make knife to about the same amoutn of damage; would need some testing though)

Offline D4NG3R NL

  • Soldier
  • **
  • Posts: 130
  • You got Rickroll'd
Re: Rupture
« Reply #3 on: July 23, 2009, 03:04:50 pm »
For what use?

If only one player needs this then write something that checks what weapon did damage

If its for the entire server, just change the weapon damage?
                  Forum Rules   -   Search