Why scope don't work ?


(trAnc3) #1

Hi there,
So what i want to do, is that thompson could zoom as fg42 can.
I tried to search code with FG42SCOPE, then copy and rename it to THOMPSONSCOPE from every where it was and put it near, so theoretically i wrote new weapon (WP_THOMPSONSCOPE), but with out any result. I go to game and press mouse2(altweapon) but it doesn’t zoom like i want, so i can’t understand what i done wrong?


(Cambodunum) #2

… dont forget to edit the *.weap file (and the animation)

greetz Cambo


(trAnc3) #3

i looked into fg42 .weap but didn’t see anything special about zoom, what i could add to thompson.weap

weaponDef
{
	// This basically fills out weaponInfo_t
	client {
		//standModel			"models/weapons2/fg42/fg42_stand.mdc"	// weapon pickup 'stand' (do we still use this?)
		pickupModel		"models/weapons2/fg42/fg42.md3"
		droppedAnglesHack
		//pickupSound		"sound/misc/w_pkup.wav"
		
		weaponConfig		"models/weapons2/fg42/weapon.cfg"
		handsModel			"models/weapons2/fg42/v_fg42_hand.mdc"
		
		flashDlightColor	1.0 0.6 0.23
		flashSound			"sound/weapons/fg42/fg42_fire.wav"		// supports up to 4 flash sounds
		flashEchoSound		"sound/weapons/fg42/fg42_far.wav"		// supports up to 4 flash echo sounds
		//lastShotSound		""										// supports up to 4 last shot sounds
		
		//readySound		""
		//firingSound		""									// no weapons seem to use this, basically it's a replacement hum for readysound, but then when firing
		//overheatSound		""
		reloadSound			"sound/weapons/fg42/fg42_reload.wav"
		reloadFastSound		"sound/weapons/fg42/fg42_reload_fast.wav"		// some weapons have fast reloads due to the skill system
		//spinupSound		""									// sound started when fire button goes down, and stepped on when the first fire event happens
		//spindownSound		""									// sound called if the above is running but player doesn't follow through and fire
		//switchSound		""									// allow overriding of weaponswitch sound
		
		//weaponIcon			"icons/iconw_fg42_1"
		weaponSelectedIcon	"icons/iconw_fg42_1_select"
		
		//missileModel		""
		//missileSound		""
		//missileTrailFunc	""									// supports "GrenadeTrail", "RocketTrail", "PyroSmokeTrail" and "DynamiteTrail" (we REALLY want a particle system for this)
		//missileDlight		0
		//missileDlightColor	0 0 0							// do we still use this?
		
		ejectBrassFunc		"MachineGunEjectBrass"				// supports "MachineGunEjectBrass" and "PanzerFaustEjectBrass"
		
		//modModel 1		""
		
		firstPerson {
			model			"models/weapons2/fg42/v_fg42.mdc"
			flashModel		"models/weapons2/fg42/v_fg42_flash.mdc"

			// weapon building
			// the parts are numbered because there are some hardcoded references for some weapons to certain parts
			weaponLink
			{
				part 0
				{
					tag		"tag_barrel2"
					model	"models/weapons2/fg42/v_fg42_barrel2.mdc"
				}
				part 1
				{
					tag		"tag_barrel3"
					model	"models/weapons2/fg42/v_fg42_barrel3.mdc"
					axisskin	"models/weapons2/fg42/fg42_axis.skin"
					alliedskin	"models/weapons2/fg42/fg42_allied.skin"
				}
				part 2
				{
					tag		"tag_barrel4"
					model	"models/weapons2/fg42/v_fg42_barrel4.mdc"
				}
			}
		}
		
		thirdPerson {
			model			"models/weapons2/fg42/fg42.md3"
			flashmodel		"models/weapons2/fg42/fg42_flash.mdc"
			
			weaponLink
			{
				part 0
				{
					tag		"tag_barrel"
					model	"models/weapons2/fg42/fg42_barrel.mdc"
				}
			}
		}
	}
}


(trAnc3) #4

It the animation is important right now ? i mean, can it zoom with out editing of human_base script file ?


(trAnc3) #5

cmon guys help me plz =]]]]


(IndyJones) #6

calm down. take ur time.


(Cambodunum) #7

… be sure you didnt forgot to define WP_THOMPSONSCOPE for WP_THOMPSON
… just creating a “new” weapon called WP_THOMPSONSCOPE isnt enough
… sorry if it sounds bitchy - but i dont know whats your skill/know-how
… if i remember correctly its in the sheet where you define the equipment
… im currently at my office so i cant take a look into the specific part/code


(Scennative) #8

ah, you must make fakemodels for:

	modModel 0			"models/multiplayer/kar98/v_kar98_scope.md3"
	modModel 1			"models/multiplayer/kar98/kar98_att.md3"

(trAnc3) #9

Are u talking about this ?



static const weap_ws_convert_t aWeapID[WP_NUM_WEAPONS] = {

	{ WP_NONE,				WS_MAX },			// 0

         list of weapons...

	{ WP_THOMPSONSCOPE,		WS_THOMPSON },


Or where can i define it ?

But i did all like WP_FG42SCOPE had ;\

noob

its in bg_pmove or bg_misc ?

Thanks for reply anyway !


(Cambodunum) #10

for a copy of a FC42_SCOPE he doesnt need fakemodels like for a K43/M1 … if i remember correctly … its 2 years ago when ive added a second fg42-like-weapon … so maybe im wrong, but im pretty sure (cuz i didnt needed these)

… should be in bg_misc
… ill take a look later, maybe im able to create a diff
… from my old mod, so youre able to check it

( be sure youre also having { WP_THOMPSON, WS_THOMPSONSCOPE }, )

greetz Cambo


(trAnc3) #11

[QUOTE=Scennative;229493]ah, you must make fakemodels for:

	modModel 0			"models/multiplayer/kar98/v_kar98_scope.md3"
	modModel 1			"models/multiplayer/kar98/kar98_att.md3"[/QUOTE]

dam i just need that thompson could zoom when i press on mouse2


(CoD4Fun) #12

i dont know the answer, but just a little question. do you want to only look through a scope with the thompson ? if yes then you only gotta do this client side (not 100% sure). but if you want to go the harder way and let the playermodels do this scoping anim, can you pls write to me a pm how you did it ?

thx in advance

[edit] i ask this because im still a bit stuck with calling some of the animations defined in body.aninc. i can only call a few, but not all :confused: i am missing something essential. still there are functions overriding other functions imo. also some others dont work. look here:

i can do some of these on the playermodel and also know how. but with some others i fail :frowning:

[edit2] a i see you already answered while i was typing. your code changes therefore should be client side, most likely something in cg_draw.c


(trAnc3) #13

[QUOTE=CoD4Fun;229501]i dont know the answer, but just a little question. do you want to only look through a scope with the thompson ? if yes then you only gotta do this client side (not 100% sure). but if you want to go the harder way and let the playermodels do this scoping anim, can you pls write to me a pm how you did it ?

thx in advance
[/QUOTE]
I will use already existed animation, its called stand_rifle, i will just replace name of animation in human_base.script

Well i already tested a lot of those animations, and all of them worked nice, and i am using etmod to see animation names and then replace them in human_base.script

No it’s not only cg_draw


(Qualmi) #14

hi,

i know how to do it. but im not givin a sh** and will tell you here (openly). youll get a pm as soon as i get to it.

greetz

edit: and sorry for beeing harsh. there are just some people who should be reduced to themselves. if you still want it pm me :wink:


(Cambodunum) #15

… wow never thought this is gonna happen
… now we’re going to pm to help each other ?!


(Qualmi) #16

well the world is not dependend from me. if you are smart enough you will find out yourself and give me a nice, stinky middlefinger :slight_smile:


(trAnc3) #17

[QUOTE=Qualmi;229511]hi,

i know how to do it. but im not givin a sh** and will tell you here (openly). youll get a pm as soon as i get to it.

greetz

edit: and sorry for beeing harsh. there are just some people who should be reduced to themselves. if you still want it pm me ;)[/QUOTE]
Sure i’ll pm you why not =]]]


(UJERebel) #18

This is called a forum, so other people can see things to…
Qualmi, why the hell would you pm the solution and not post it, you really feel so important? :o

Mostly i don’t like discussions as these, because im a child, but now you arent even childdish, you are sad…


(Qualmi) #19

yep you are right, i am sad :wink:

but still you gotta understand me. i am just disappointed by some people, but it doesnt really belong here. so just understand me or GTFO.

thx


(Cambodunum) #20

well the world is not dependend from me. if you are smart enough you will find out yourself and give me a nice, stinky middlefinger

… i dont need your help qualmi
… but good to know
… thumbs up!!

but still you gotta understand me. i am just disappointed by some people, but it doesnt really belong here. so just understand me or GTFO.

… then ill prefer “GTFO” in this case