Author Topic: CreateBullet() damage 0  (Read 884 times)

0 Members and 1 Guest are viewing this topic.

Offline Nedi

  • Major(1)
  • Posts: 47
CreateBullet() damage 0
« on: January 23, 2013, 06:05:37 pm »
Hi!

I have problem with CreateBullet procedure. I want spawned bullet to do 0 damage. I have tried to set up hit multiplier to 0, -100 and -9999. Bullets were pwning soldier in one hit. I have tried m79 grenades and flaming arrows. Is it possible to spawn bullet doing 0 damage?

Offline rOy

  • Soldier
  • **
  • Posts: 120
Re: CreateBullet() damage 0
« Reply #1 on: January 23, 2013, 06:11:42 pm »
hey

Why if we are:

Code: [Select]
function CreateBullet(X, Y, VelX, VelY, HitM: single; sStyle, Owner: byte): integer;
begin
end;

Code: [Select]
function CreateBullet(X, Y, VelX, VelY, HitM: single; sStyle, Owner: byte): integer;

Parameter Info:
 X (Single): X coordinate for the bullet to appear
 Y (Single): Y coordinate for the bullet to appear
 VelX (Single): X Velocity for the bullet to travel.
 VelY (Single): Y Velocity for the bullet to travel.
 HitM (Single): Hit Multiplier (Usually 100 works good)
 sStype (Byte): Bullet style. See this page for bullet types.
 Owner (Byte): Player who will be given credit for any kills by the bullets.

Description:
 This function will create a projectile that will be visible to all players.
 NOTE: Certain exploding bullet types have been disabled due to it causing weapon mod problems.

Code: [Select]
sType list (from weapons.ini)
 1        plain bullet
 2        frag grenade
 3        shotgun pellets
 4        m79 grenade
 5        flame
 6        punch
 7        arrow
 8        flame arrow
 9        cluster nade
 10       cluster shrapnel
 11       knife/chainsaw
 12       LAW missile
 13       knife
 14       M2 bullet
 (as of soldatserver 2.6.3 bullet types 8,9 and 12 do not work properly, also plain bullets spawn only
 if the owner has a plain bullet weapon)

Example:
Code: [Select]
begin
   CreateBullet(GetPlayerStat(1,'x'), GetPlayerStat(1,'y') - 500, 0, 0,100, 2, 1);
   // Will spawn a grenade above Player ID 1 with 0 Velocity, so it falls straight on top of them.
end;

edit: Nedi you think about something else,sorry ;)
« Last Edit: January 24, 2013, 11:26:39 am by rOy »

Offline TheOne

  • Soldier
  • **
  • Posts: 208
Re: CreateBullet() damage 0
« Reply #2 on: January 23, 2013, 06:25:27 pm »
Please paste code.

Offline Nedi

  • Major(1)
  • Posts: 47
Re: CreateBullet() damage 0
« Reply #3 on: January 23, 2013, 06:27:10 pm »
@r0y Hmm Sorry I don't understand your post.

Didn't see it is a function. Lol
What does it return?

Can't paste code I'm on phone. I will do it tommorow.

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: CreateBullet() damage 0
« Reply #4 on: January 24, 2013, 03:42:48 am »
It's not possible. m79, flaming arrow and LAW have hardcoded damage that cannot be prevented from script.
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline Nedi

  • Major(1)
  • Posts: 47
Re: CreateBullet() damage 0
« Reply #5 on: January 24, 2013, 04:06:18 am »
Hm thanks. That explains a lot.