• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code Help Coding Complex Weapons/Equipment like these...

StarArk99

Active member
Aug 25, 2012
33
0
I want to make some seemingly complex weapons and equipment for my own mut, but I just can't seem to get around certain problems. Below is a few.

What I Want To Make: A weapon that, when placed after a few seconds, will spawn a certain number of a projectile
I want to make an equipment class weapon that will spawn around 20 small homing missiles, one after the other.
The Problem I'm Having: Can't make more than 1 missile spawn at the source.
I can get them to home-in correctly, but I don't know any other way of making more than 1 missile spawn at a time, without making the next missile spawn from the previous, instead of from the source. How can I do this?


What I Want To Make: A weapon that, when the trigger is held, will increase Damage, Head Shot Damage Multiplier, Max Penetration #, Penetration Damage Reduction, Max Range, Projectile Speed, Max Projectile Speed, and Ammo Per Fire, among a few others.
I took a look at the Husk Gun and it's projectile depends on how long the trigger is held, so I can pretty much manage that much.

The Problem I'm Having: I don't know how I'd be able to modify the other stats, without having multiple projectiles like the Husk Gun uses.


What I Want To Make: A weapon that, when thrown on the ground, will increase Damage for all players within its range, as long as they remain in range, for as long as it lasts. It will emit a field that will outline its range and it will emit beams that reach out to players within its range, letting them know that their damage is being multiplied.

The Problem I'm Having: I wouldn't even know where to start, but if I can't get this down, then I can most likely mod its code to make variants that repair armor, heal players and regenerate ammo.

I think this is enough questions for a week and any help would seriously help me out a lot.
It would also really be useful in my Mut, on Extinction Difficulty (2 Higher than HoE), where players spawn with no Syringe, Welder, or Cash, plus they only get 30 seconds in the shops, and have to fight specimens whose stats adapt from Difficulty and Player Number, all the way down to Perk Class and Perk Level...
 
I'm breaking my 666 post count for this.

Look at the Seeker 6 for a seeking rocket and a multirocket fire.

You didn't read the HuskGunFire class if you think it does damage and stuff through the projectile classes. You missed an entire function - namely the one that actually does the damage changes: function PostSpawnProjectile(Projectile P). That can probably be used for all of your changes.

The increase damage output might be doable if you intercept takedamage (the super neato game rules one) and check if the instigator is within the radius of the actor that emits this damage buff. Beams might be possible with a beam emitter where, in the tick, you check how many players are in the radius of the actor and attach an endpoint to the players inside.

All equipment can be removed from the... pawn class? I forget. Just extend KFPawn or whatever and remove the RequiredEquipment. Starting cash and zed capabilities are modified by difficulties already so just look at KFGameType or whatever for how it does it.

2 difficulties higher than HoE... yeah, sure...

Seems like all your questions there.
 
Last edited:
Upvote 0
I'm breaking my 666 post count for this.

Look at the Seeker 6 for a seeking rocket and a multirocket fire.

You didn't read the HuskGunFire class if you think it does damage and stuff through the projectile classes. You missed an entire function - namely the one that actually does the damage changes: function PostSpawnProjectile(Projectile P). That can probably be used for all of your changes.

The increase damage output might be doable if you intercept takedamage (the super neato game rules one) and check if the instigator is within the radius of the actor that emits this damage buff. Beams might be possible with a beam emitter where, in the tick, you check how many players are in the radius of the actor and attach an endpoint to the players inside.

All equipment can be removed from the... pawn class? I forget. Just extend KFPawn or whatever and remove the RequiredEquipment. Starting cash and zed capabilities are modified by difficulties already so just look at KFGameType or whatever for how it does it.

2 difficulties higher than HoE... yeah, sure...

Seems like all your questions there.

Also, you would need modify how much the ZED damage multiplier gets and the HP multiplier for those difficulties as well
 
Upvote 0