Author Topic: Arrows  (Read 5294 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!
Arrows
« on: July 21, 2009, 07:21:08 pm »
I've been trying to mod gun projectiles to arrows ( from the rambo bow ) they hurt the person to the point of like almost no life, but they don't kill them off completely same for fire arrows. can you please respond asap ( if you can )
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 Hacktank

  • Camper
  • ***
  • Posts: 462
  • Soldat Scripter
    • HTZRPG
Re: Arrows
« Reply #1 on: July 21, 2009, 11:46:38 pm »
That is just how it is, guns modded with arrows will always leave a victim with 1 hp, you could fix this with a script, if you want i can make you one that will compensate for this.


Offline Dpulse

  • Major
  • *
  • Posts: 54
    • Not sure what Chop N' Shop is? Visit one of the places above or view this topic!
Re: Arrows
« Reply #2 on: July 22, 2009, 12:57:33 pm »
yea that'd be really helpful!
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 demoniac93

  • Veteran
  • *****
  • Posts: 1554
Re: Arrows
« Reply #3 on: July 22, 2009, 01:54:41 pm »
Hmmm, so that a player (After taking an arrow) will instantly and automatically regain an amount of health? Won't that make the game play too complicated?
b&

Offline Dpulse

  • Major
  • *
  • Posts: 54
    • Not sure what Chop N' Shop is? Visit one of the places above or view this topic!
Re: Arrows
« Reply #4 on: July 22, 2009, 01:59:01 pm »
no, he's going to make a script making sure the arrows will finish off the opponent, not leaving them at 1hp.
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 croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: Arrows
« Reply #5 on: July 22, 2009, 02:18:31 pm »
Code: [Select]
function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer);
begin
   if GetPlayerStat(Shooter, 'Primary') = *WEAPON NUMBER* then DoDamage(Victim,4000);
   SetScore(Shooter,GetPlayerStat(Shooter,'Kills')+1);
end;

Will instantly kill an enemy (will show it as suicide though) and add 1 point to the killer.

The weapon you modded goes in *WEAPON NUMBER*
This are the numbers of the weapons:
0 USSOCOM
1 Deagles
2 HK
3 AK-74
4 Steyr AUG
5 Spas
6 Ruger
7 M79
8 Barrett
9 Minimi
10 Minigun
11 Flamer
12 Bow
13 Flame Bow
14 Knife
15 Chainsaw
16 Law
255 Hands

If you modded more than 1 weapon, then repeat the same thing like this:

Code: [Select]
function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer);

begin
   if GetPlayerStat(Shooter, 'Primary') = *WEAPON 1 NUMBER* then     DoDamage(Victim,4000);
   SetScore(Shooter,GetPlayerStat(Shooter,'Kills')+1);

   if GetPlayerStat(Shooter, 'Primary') = *WEAPON 2 NUMBER* then     DoDamage(Victim,4000);
   SetScore(Shooter,GetPlayerStat(Shooter,'Kills')+1);

{etc... etc...}
end;


I could make an better one, but im currently busy with some other stuff.
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline tk

  • Soldier
  • **
  • Posts: 235
Re: Arrows
« Reply #6 on: July 22, 2009, 03:06:53 pm »
Just modify a result of OnPlayerDamage. You don't have to use DoDamage and SetScore then.

// ...
Result := 150;
//...

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: Arrows
« Reply #7 on: July 22, 2009, 03:55:14 pm »
Heh, totally forgot that the value is moddable.
>_>  ._.  <_<
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline Dpulse

  • Major
  • *
  • Posts: 54
    • Not sure what Chop N' Shop is? Visit one of the places above or view this topic!
Re: Arrows
« Reply #8 on: July 22, 2009, 05:03:09 pm »
so is the script you made corrected now?
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 croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: Arrows
« Reply #9 on: July 22, 2009, 06:47:44 pm »
Code: [Select]
function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer);
begin
   if GetPlayerStat(Shooter, 'Primary') = *WEAPON NUMBER* then Damage := 9001;
end;

The weapon you modded goes in *WEAPON NUMBER*

Should work now.

Damage just needs to be higher than 1 if the enemy is really at 1hp, 150 is the default health, i placed 9001 for a lulz.
Same as with the code above if you modded more than 1 weapon.
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline Dpulse

  • Major
  • *
  • Posts: 54
    • Not sure what Chop N' Shop is? Visit one of the places above or view this topic!
Re: Arrows
« Reply #10 on: July 22, 2009, 07:15:15 pm »
ok thanks!
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 JFK

  • Camper
  • ***
  • Posts: 255
    • My TraxInSpace Account
Re: Arrows
« Reply #11 on: July 23, 2009, 02:20:25 pm »
Typo there, pretty sure it should be:

Code: [Select]
function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer);
begin
   if GetPlayerStat(Shooter, 'Primary') = *WEAPON NUMBER* then Result := 9001;
end;

But if I get it right this should only happen when shooter uses bow and the victim is close to 1 hp? so:

Code: [Select]
function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer);
begin
   if (GetPlayerStat(Shooter, 'Primary') = 12) and (GetPlayerStat(Victim, 'Health') < 10) then Result := 10;
end;

Not tested...
Come join: EliteCTF
Listen to: My Music

Offline tk

  • Soldier
  • **
  • Posts: 235
Re: Arrows
« Reply #12 on: July 23, 2009, 02:41:39 pm »
Quote
function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer);
begin
  Result := Damage;
  if Victim <> Shooter then if (GetPlayerStat(Shooter, 'Primary') = 12) and (GetPlayerStat(Victim, 'Health') < 10) then Result := 10;
end;
« Last Edit: July 23, 2009, 02:46:30 pm by tk »

Offline JFK

  • Camper
  • ***
  • Posts: 255
    • My TraxInSpace Account
Re: Arrows
« Reply #13 on: July 23, 2009, 02:53:28 pm »
Together we'll make it ;)
Come join: EliteCTF
Listen to: My Music

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: Arrows
« Reply #14 on: July 24, 2009, 12:32:42 am »
@ tk- He that means that it will be active only if the weapon the shooter is having as a primary is the Bow equipped, and he said:

I've been trying to mod gun projectiles to arrows (from the rambo bow )
Which means he is using a normal gun (lets say, deagles) which have modified the bullet type to 7 (arrow)
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline tk

  • Soldier
  • **
  • Posts: 235
Re: Arrows
« Reply #15 on: July 24, 2009, 01:43:19 am »
Then use ReadINI() to check what weapons use bulletstyle 7 in weapon mod file and save it into array of boolean.
Code: [Select]
var
uses_arrow: array [1..16] of boolean;

//...

function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer);
begin
  Result := Damage;
  if Victim <> Shooter then if (uses_arrow[GetPlayerStat(Shooter, 'Primary')]) and (GetPlayerStat(Victim, 'Health') < 10) then Result := 10;
end;

//...


Offline Shard

  • Camper
  • ***
  • Posts: 449
  • yeet
Re: Arrows
« Reply #16 on: July 26, 2009, 08:07:33 am »
Im confused, could this be done with bullet speed and damage in weapons.ini?

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: Arrows
« Reply #17 on: July 26, 2009, 08:59:20 am »
Actually no, eC did it to make the bow usable only in RM afaik.
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: Arrows
« Reply #18 on: August 16, 2009, 06:04:09 am »
Quote
function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer);

Sorry, but i know you're all not dumb but looks like you never seen OnPlayerDamage function_

Quote
function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer)
AND
Quote
: Integer;

bye^^

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: Arrows
« Reply #19 on: August 16, 2009, 08:43:08 am »
What are you trying to say?
And learn the meaning of a goddam typo.
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.