News: Celebrating over 10 years serving the creative community

Author Topic: Make Crossbow hitscan  (Read 1265 times)

TheUnbeholden

  • Roach
  • *
  • Posts: 20
Make Crossbow hitscan
« on: January 04, 2012, 06:02:42 PM »
I need to know how make it hit its mark instantly after firing.

Doommarine23

  • Scientists
  • **
  • Posts: 28
  • CALHOUUUUUUUUUUN
    • Half-Life Zone, a niche modding community
Re: Make Crossbow hitscan
« Reply #1 on: January 04, 2012, 06:32:18 PM »
This would to my knowledge require a lot of recoding (at least that I know of). The best bet would to take a gun like the revolver, add a scope (DM already technically has it) and boom.

By the way, as a follow up, how did the CS:S arms go?
Cλptain B.O: Pr0 as fuck idea: Scale up to 4096x4096 and add noise
Doommarine23: Fake-Factory Edition
Cλptain B.O: Add rust to the sky

James

  • Administrator
  • Big Momma
  • *****
  • Posts: 619
Re: Make Crossbow hitscan
« Reply #2 on: January 05, 2012, 08:39:46 AM »
The function is

FireBullets( NumberOfShots, StartShotFrom, EndShotAt, BulletSpreadCone, ShootDistance, BulletType, HowOftenItMakesATracer, DamagePerShot, Attacker->pev )

Look at any of the weapon files, such as glock.cpp.

Simon

  • BSR Team
  • Baby Gargantua
  • *
  • Posts: 473
  • Whiskey brony
Re: Make Crossbow hitscan
« Reply #3 on: January 05, 2012, 09:07:08 AM »
Wouldn't it be easier to simply raise the speed of the dart ? Don't have the name of class in mind but if you want to keep the flying dart and it's model you can't replace the original shoot function with a call to FireBullets

TheUnbeholden

  • Roach
  • *
  • Posts: 20
Re: Make Crossbow hitscan
« Reply #4 on: January 07, 2012, 02:24:07 AM »
The function is

FireBullets( NumberOfShots, StartShotFrom, EndShotAt, BulletSpreadCone, ShootDistance, BulletType, HowOftenItMakesATracer, DamagePerShot, Attacker->pev )

Look at any of the weapon files, such as glock.cpp.

Where is crossbow.cpp or any cpp file? A search of my half-life folder showed up nothing
« Last Edit: January 07, 2012, 02:26:15 AM by TheUnbeholden »

Editor

  • Administrator
  • Gman
  • *****
  • Posts: 1321
  • Some nerd
    • Half-Life Creations
Re: Make Crossbow hitscan
« Reply #5 on: January 08, 2012, 04:22:55 PM »
Need to know how to code buddy. James gave you the section of code you need to modify. Need to work in the SDK.