[Weapons] Half-Life 1 Weapons Megathread (update June 30th)

Author Topic: [Weapons] Half-Life 1 Weapons Megathread (update June 30th)  (Read 15921 times)



the reload for the revolver is sick
though I really like that it's q spammable
I see a lot of potential for dm maps based around these weapons
good job

I'm having trouble reproducing the issue. Are you trying to fire and it goes into a weird reload loop or is the effect noticeable whenever you reload?
Might be an add-on conflict tbh
i was just pressing r over and over to show the weird effect
i think it might have something to do with server_pgdie yup
« Last Edit: June 23, 2017, 12:09:56 PM by torin² »

Okay so I looked into this and I concluded that it works in normal minigames but not Slayer minigames. Is there an extra step I'm supposed to be taking when making guns that account for Slayer?
it looks like you didn't add the sourceObject field to projectiles, which is causing the issue. you create your projectiles like this
Code: [Select]
%proj = new Projectile()
{
dataBlock = tankShellProjectile;
initialPosition = %position;
client = %client;
};
(^^ from satchel charge)
when it really should be like this:
Code: [Select]
%proj = new Projectile()
{
dataBlock = tankShellProjectile;
initialPosition = %position;
sourceObject = %client.player;
client = %client;
};
where the sourceObject field is the player who created the projectile

LOVE these weapons. Especially the raycasting ones. The way you handle the projectiles with each one makes it so that the hit-marker add-on still works, even better than g-cats ray-casting weapons. Would it take a lot of work for me to somehow do this with the other weapons as well? The projectile weapons kinda become impossible to use once you ramp up the player's speed. The bullets always travel to the left or right depending on which direction you're headed and the influence in direction increases with the player's speed, so if i wanted to do a quake DM, it's unplayable and shooting things is a real pain even though the weps are awesome. So yeah, any way you could tell me how to make the other guns raycast too? Would much appreciate that man.

Yeah I think that's mostly to do with velocity inheritance field on the projectiles

Since the forum is back I'll probably fix stuff today

it looks like you didn't add the sourceObject field to projectiles, which is causing the issue. you create your projectiles like this

where the sourceObject field is the player who created the projectile

All of the projectiles in the main gun pack is instantiated with a sourceObject field
« Last Edit: June 28, 2017, 06:49:51 AM by Rally »

Nice! You should make a button to let us download all of the things at once though

Edit: NVM saw all the guns are packaged together

ill check this for any problems when i get home

also velocity inheritence is usually at like 0.5-0.8 cause any more and the projectile gets too influenced by falling or something.
« Last Edit: June 28, 2017, 08:37:54 PM by Conan »

Yeah I think that's mostly to do with velocity inheritance field on the projectiles


Velocity inheritance? I feel like i've seen that abbreviated in the code of most weapons. Is there a way I can set that to ZERO by chance?

Velocity inheritance? I feel like i've seen that abbreviated in the code of most weapons. Is there a way I can set that to ZERO by chance?

yeah if you wanna fix it before i update it just go to line 226 in effects.cs and set velInheritFactor to be equal to 0. it will apply to all guns


Update 1.0.1 for Weapon_HL1Guns

https://leopard.hosting/download.php?f=utmxm&name=Weapon_HL1Guns.zip

Changes in this version:
- VelInheritFactor set to 0 for all weapons.
- Removed ability to reload weapons when they are full.
- Added the following prefs:

$Pref::HL1Guns_DMGColt - Damage done by revolver
$Pref::HL1Guns_DMGCrossbow - Damage done by crossbow
$Pref::HL1Guns_DMGCrowbar1 - Damage done by crowbar's light attack
$Pref::HL1Guns_DMGCrowbar2 - Damage done by crowbar's heavy attack

$Pref::HL1Guns_DMGBullet - Base bullet damage, essentially the pistol damage
$Pref::HL1Guns_ScaleDMGShotgun - Amount to scale shotgun's projectile from base bullet projectile
$Pref::HL1Guns_ScaleDMGMP5 - Amount to scale MP5's projectile from base bullet projectile

$Pref::HL1Guns_ShotgunPellets1 - Amount of pellets fired by shotgun's primary fire
$Pref::HL1Guns_ShotgunPellets2 - Amount of pellets fired by shotgun's secondary fire

$Pref::HL1Guns_MP5GrenadeData - DataBlock name of the MP5 grenade (e.g. tankShellProjectile)
$Pref::HL1Guns_MP5GrenadeScale - Scale of the MP5 grenade

$Pref::HL1Guns_CrossAltEnb - Enable/Disable crossbow altfire
$Pref::HL1Guns_PistolAltEnb - Enable/Disable pistol altfire
$Pref::HL1Guns_ShotgunAltEnb - Enable/Disable shotgun altfire

$Pref::HL1Guns_HitEffect - DataBlock name for the bullet hit effect (e.g. gunExplosion)


Some prefs may require you to type /rebuildHL1guns or restart your server. To set a pref to it's default value set it to "" and then type /rebuildHL1guns

Still don't know what's wrong with the Slayer problem. Was working fine on a slayer server I played not long ago.

Making global variables for damage fields is redundant and extra unless you're plugging it into a master algorithm at some point.

Instead you should just use a damage multiplier value and apply it to all guns in a parented damage function.

Why the forget are you allowed to reload when your revolver is full?