Page 1 of 1

Need help with mg42, medic and spy

Posted: Thu Dec 06, 2007 7:44 pm
by Sorken
Hello.

Me and my friend Smiskey stared making a custom realism some time ago, cause we wanted to try and make a realistic realism mod, with realistic firespeeds and all that. None of us really know how to program att all, but with a lot of trail and error we managed to edit all the weapons tik-files and achive a fairly well balanced realistic realism.

But during that work a lot of crazy ideas about stuff to add to the mod popped up. We tried a few times to get some of these ideas to work, but as Ive mentioned before none of us know much about programing/scriptig, so therefore we failed capitally.

So by now we ahve realised that our only hope in seeing some of those features we dreamed about in use it to ask some people who know what they are doing. And this placed seemed to be a great place to ask at. So if you have read this far; here comes the actuall things we need help with:

1. We want to replace the Panzerschreck with a MG42 machine gun. I know this can be done serverside, but I have no idea how.

2. We want to replace the Axis shotgun with a Medic class, that means thier main weapon would instead of the shotgun be some kind of dropable medicpack. Not sure if that can be done, so therefore we havnt really sorted all the deatails out about how we want that.

3. We want to replace the Bazooka with a Spy class, so that when you chose the bazooka you instead spawn with only a silenced pistol and wearing a Axis skinn. Im pretty sure this can be done, not sure how though.

Thanks for your time!
/Sorken

Posted: Thu Dec 06, 2007 9:30 pm
by erick
For the medic just open the tik for the shotgun and where it says bulletdamage 10 change the 10 to a negative number. You can change the firing and reloading sounds to something else. Change the bulletrange to 64 or 100. You can also make the gun disappear so there are just hands there. Add "rendereffects +dontdraw" to the tik right under where it says

Code: Select all

TIKI


setup
{
	scale 1.0	// Needs to be unnaturally large so it is visible
	path models/fx/dummy
	skelmodel dummy3.skd
}


init
{
	server
	{
		rendereffects 		+dontdraw

Posted: Thu Dec 06, 2007 11:38 pm
by Sorken
I tried what you suggested Erick, and it half worked. This way it requires you to have friendly fire enabled for it to work. Allso it has the problem that it gives both teams the medic. My intentions were for just te axis to get the medic in order to allso keep the shotgun in play. Is there any way around all of these problems?

/Sorken

Posted: Fri Dec 07, 2007 1:09 am
by bdbodger
Some or all of what you want can be done I don't know if it can all be done serverside though . I have an idea for the Medic class though . You would have to have a scirpt that monitors the players for team and weapon . I use JVmaps trick to fine weapon

Code: Select all

local.randnum = randomint 1000
	self weaponcommand mainhand targetname ("weap" + self.entnum) //local.randnum) // weaponcommand dual 
	local.weap = $("weap" + self.entnum)  //("weap" + local.randnum)

	if(local.weap != NULL)
	{
		local.weap.targetname = ""
bla bla bla local.weap is the weapon model the player is using so starting from there you take the shotgun away from the team you want . Trouble is if you don't have a weapon you won't see your hands but what I might do is to attach a medkit to your hand and then check to see if you use your use key . If you do then spawn a medkit appox where the other one in your hand is and make it fly forward from there and land on the ground for other players to pick up . You would have to take all weapons away from the player or the grenade or binoculars might interfear . Other things would have to be done to manage it like exit the thread if the player dies or changes team .

Posted: Fri Dec 07, 2007 3:12 pm
by jv_map
Regarding replacing the panzerschreck with a mg42 -- unless you're willing to dig very, very deep into moh scripting I would suggest to try Squadmaker. The support gun module of this mod can be run stand-alone. :)

Posted: Fri Dec 07, 2007 4:07 pm
by Sorken
I have looked at Squadmaker eralier, but I havnt been able to run the MG42 only. Some help would be much aprichiated.

/Sorken

Posted: Mon Dec 10, 2007 2:58 am
by LilChefDeath
uhh i can try to make the rocket shoot like the mg..but i dont know how far ill get...but its worth a try

Posted: Mon Dec 10, 2007 3:26 am
by LilChefDeath
ok started messin with some things.im not sure if this is what you want.but it hopefully will replace the Panzerschreck with the mg-42.i got it to replace the Panzershreck.Now i have to start actually doin the scripting part.because i get it to shoot but cant see the mg..so im gonna read over a few things and hopefully fix it.
Image