Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Buckshot ammo for pistols and Poison bullets
#1
So I want to make buckshot ammo for pistols which would give it multiple projectiles. But I don't know how to give it multiple rays. 

I already tried: 
Code:
rays = 20,

and
Code:
self._rays = 20

but it didn't work.
This should be possible since Underbarrel 40mm Buckshot Shotgun also works.. somehow

Well and also if someone knows how to give bullets a poison effect I would also  to know that. ^_^
Reply
#2
Idk how to create custom ammo for existing weapon.

But in custom weapon case, just having rays = x>1 on the custom ammo variable won't produce anything.
The way I do it on custom weapon, I have to change the custom weapon base script (in the .unit files) to shotgun in order to have multiple rays spread shot.
Then the custom ammo that have rays = x>1 will work and the rays shot will be multiple pellet that spread like buckshot
Reply
#3
Ahh ok well I can't just change all 9mm guns to shotgun.. or can I? Wouldn't that put all of these guns in the shotgun category in the weapons menu?

Also, making custom ammo is super easy if you want to do small things like give it AP or increase the damage. But if you want to do other stuff (the poison effect for example >:( it can get complicated)
Reply
#4
Not the weapon category itself, but what the type of weapon raycast it use.
In custom weapon, any non-shotgun weapon uses the newracycastweaponbase lua
While shotgun uses NewShotgunBase lua

That Contender I made is classified as Special (grenade launcher internally), but uses shotgun base script to have the buckshot ammo type work.
Reply
#5
hmm ok thanks I'm going to try this later. Anything about the poison ammo?
Reply
#6
Unfortunately no..

I reckon it must be hooked to melee poison damage maybe..
Reply
#7
What I tried for the Poison ammo:
I added the PoisonBulletBase code in the raycastweaponbase lua saved it to my hooks
and then used it like this in the weaponfactorytweakdata lua:

self.parts.wpn_fps_poison44.custom_stats = {
bullet_class = "PoisonBulletBase",
rays = 1,
ammo_pickup_min_mul = 0.1,
ammo_pickup_max_mul = 0.2
dot_data = {
type = "poison",
custom_data = {dot_length = 999, hurt_animation_chance = 0.05, dot_damage = 1,dot_trigger_max_distance = 3000,dot_tick_period = 1}
}
}
Reply
#8
Hmm, is there any vanilla arrow type that deals poison damage?
Reply
#9
Yes there are Poison arrows for the bows and also Poison bolts for the crossbows.
Reply
#10
(09-12-2017, 04:55 AM)Killerwolf Wrote: What I tried for the Poison ammo:
I added the PoisonBulletBase code in the raycastweaponbase lua saved it to my hooks
and then used it like this in the weaponfactorytweakdata lua:

self.parts.wpn_fps_poison44.custom_stats = {
bullet_class = "PoisonBulletBase",
rays = 1,
ammo_pickup_min_mul = 0.1,
ammo_pickup_max_mul = 0.2
dot_data = {
type = "poison",
custom_data = {dot_length = 999, hurt_animation_chance = 0.05, dot_damage = 1,dot_trigger_max_distance = 3000,dot_tick_period = 1}
}
}

But this didn't work... sadly
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)