Modding Damage and ForceOnExplosion

Ask questions, discuss ideas, get answers

Modding Damage and ForceOnExplosion

Postby Texafornian » Sat Feb 04, 2017 2:02 am

Hey all,

I'm trying to mod the Bazooka to act like the rocket launcher in Team Fortress Classic/2: you can either boost yourself into the air with limited damage to yourself OR you can use it to damage/kill the other team. At the moment I've got the ForceOnExplosion and Damage effect numbers worked out such that the boost works without causing much damage to the player, but the drawback is that it causes that same amount of reduced damage to the enemy team.

Is there a way to have both desired effects at once via materials editing? I was also considering using a "secondary fire" option but appears to be essentially limited to the binoculars. If neither of those options work then I'll just settle on adding a second Bazooka used for boosting.
Texafornian
 
Posts: 8
Joined: Sat Feb 04, 2017 1:55 am

Re: Modding Damage and ForceOnExplosion

Postby Swaffy » Thu Mar 30, 2017 4:05 am

I think the only way to do this is use it for direct hits. You cannot direct-hit yourself so make it have a low splash damage (material2) and a higher direct-hit damage (material). There is a way to reduce damage over distance but I don't think that can be reversed. I really am not sure how to get your desired damage style except what I explained.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Image
User avatar
Swaffy
 
Posts: 1645
Joined: Sun Aug 29, 2010 9:25 pm
Location: San Antonio, Texas, U.S.

Re: Modding Damage and ForceOnExplosion

Postby Texafornian » Thu Mar 30, 2017 9:49 pm

That seems like a good solution, thanks.
Texafornian
 
Posts: 8
Joined: Sat Feb 04, 2017 1:55 am

Re: Modding Damage and ForceOnExplosion

Postby Swaffy » Fri Mar 31, 2017 2:56 am

Here is the piece of code I was talking about:

ObjectTemplate.minDamage 0.5
ObjectTemplate.distToStartLoseDamage 100
ObjectTemplate.distToMinDamage 200

This is added at the end of projectile's code to set the damage drop for that projectile. I wish there was a way to flip it so damage is added, ah well...

There is also this other peculiar piece:
ObjectTemplate.ProximityFusePrimer 0.1

I thought, maybe, that prevents the projectile from exploding within a certain distance, but I don't think it causes the explosion "push" which you want. Worth playing with. You can find this line in the vanilla AA projectile.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Image
User avatar
Swaffy
 
Posts: 1645
Joined: Sun Aug 29, 2010 9:25 pm
Location: San Antonio, Texas, U.S.


Return to 1942 Modding Discussion

Who is online

Users browsing this forum: Google [Bot] and 8 guests

cron