ZERO Sievert

ZERO Sievert

ZERO Sievert Workshop
Dive into post-apocalyptic chaos with new weapons, quests, NPCs, factions, languages and much more. Prepare for endless extractions in this community-lead, expanded world of Zakov.
Can I change bullet spawn location on weapons?
I'm working on a weapon mod, and it seems that both the bullets and particles are spawning in the center of my gun. My weapon doesn't have a barrel attachment, but the EC 74U seems to be like that too and it works fine.

Is there a way to change the spawn location of the bullets?
< >
Menampilkan 1-1 dari 1 komentar
I managed to fix this!
The issue was that I used a seperate sprite for the weapon base in game and in inventory, so it looked something like this:

SpriteLoad("exampleweapon","weapon/mod_exampleweapon_base.png",1,1,0,0) SpriteLoad("exampleweapon_ingame","weapon/mod_exampleweapon_base_ingame.png",1,0,16,10) WeaponCreate("exampleweapon","rifle",true,"ammo_9x19","a9x19") ItemSetSpriteInventory("exampleweapon" , "exampleweapon") ItemSetSpriteIngame("exampleweapon" , "exampleweapon_ingame")

The issue was right on this line:

SpriteLoad("exampleweapon_ingame","weapon/mod_exampleweapon_base_ingame.png",1,0,16,10)

I made a sprite called "mod_exampleweapon_base_ingame" that had the dimensions of the sprite itself, aka not a multiple of 16, like with attachments. The fix is to just use the inventory sprite, which should have dimensions of a multiple of 16.

So the fixed version is:

SpriteLoad("exampleweapon","weapon/mod_exampleweapon_base.png",1,1,0,0) SpriteLoad("exampleweapon_ingame","weapon/mod_exampleweapon_base.png",1,0,16,10) WeaponCreate("exampleweapon","rifle",true,"ammo_9x19","a9x19") ItemSetSpriteInventory("exampleweapon" , "rugerpc") ItemSetSpriteIngame("exampleweapon" , "exampleweapon_ingame")
Terakhir diedit oleh YellowKnight; 25 Jun @ 7:22am
< >
Menampilkan 1-1 dari 1 komentar
Per halaman: 1530 50