HL2 MyMod code help

Grab your favourite IDE and tinker with the innards of game engines

HL2 MyMod code help

Postby sb88 on Tue Apr 24, 2007 8:37 am

Hi, im using MS visual C++ express edition and upon following the tutorial "importing css weapons into hl2" on the valve devloper community im stuck at a part to do with getting the "cl_righthand" command into my mod engine, it told me to comment out a couple of IF statements in a file named C_baseviewmodel.cpp which i have done but when i click Build then Compile it has no effect on the game at all and i still cant flip my weapon from the left hand side, does anyone know a solution to this, or can you tell me if im doing something wrong, i dont really understand C++ at all but any help would be appreciated on this matter. Thanks
sb88
Dumpling
Dumpling
 
Joined: Tue Apr 24, 2007 8:29 am

Postby ChopperDave on Tue Apr 24, 2007 1:26 pm

Make sure that when you compile that the DLLs produced by the compile are going into your mod's bin folder. Check the build properties for the client and server projects and make sure that's where they're going.
User avatar
ChopperDave
Rockstar San Diego
 
Joined: Wed Feb 21, 2007 6:06 pm

Postby Hona on Tue Apr 24, 2007 3:52 pm

You need to be sure that you are using Released instead of Debug at the Configuration Manager when you are compiling the code.
Lev ditt liv som en helg
Hona
1337 p0st3r
1337 p0st3r
 
Joined: Sun Jan 08, 2006 7:15 pm
Location: Sweden

Postby sb88 on Tue Apr 24, 2007 7:26 pm

ok well i go into my cl_dlls folder in my C:\MyMod folder and open up the client_hl-2005 project and then open the c_baseview..... after editing the c_baseviewmodel.cpp i click Build the compile (shif+F7) and it still doesnt work, even though it says it compiled sucessfully with no erors
sb88
Dumpling
Dumpling
 
Joined: Tue Apr 24, 2007 8:29 am

Postby longshanks on Tue Apr 24, 2007 7:35 pm

Also make sure you change the script files with the builtlefthanded or whatever it is command for each weapon or else you won't notice anything different.
longshanks
Turbine Entertainment Software
 
Joined: Mon Nov 14, 2005 11:39 pm
Location: BOSTON!!!

Postby sb88 on Tue Apr 24, 2007 7:38 pm

yeah i did that too im having some problems with the weapons anyway they all seem to have messed up origins even after following the turorial about 7 times literally i get the same buggy results with the weapons, i tireid to replace the smg with an M4 model and the hands appear but the gun is back to front and the barrel points into my chest and i cant fix that at all, so when i actually run a map with that gun all i get is a pari of hands on the left hand side of the screen and the gun is pointing into my chest
sb88
Dumpling
Dumpling
 
Joined: Tue Apr 24, 2007 8:29 am

Postby ChopperDave on Tue Apr 24, 2007 8:26 pm

it says it compiled sucessfully with no erors


It can still compile successfully even though you have the wrong configuration going. Can you verify you're using Release and that the build output is going to your mod's bin folder?

If you don't know how to do this, I (or someone else on here) can walk you through it.

Also, can you provide a link to the tutorial you're using?
User avatar
ChopperDave
Rockstar San Diego
 
Joined: Wed Feb 21, 2007 6:06 pm

Postby Hona on Tue Apr 24, 2007 8:41 pm

I must say that I have just started to change a few codelines here and there so I may not be correct with this but here it goes.

You really need to make sure that you have chosen Released instead of Debug, or else there will be errors, they may not show up when you are building it but it shows up in-game.
Just go to Build - Configuration Manager and choose Release instead of Debug, then Build - Rebuild Solution to let it build it all (I'm not sure if you need to choose Rebuild Solution but that's the one I choose).

Also, you said "after editing the c_baseviewmodel.cpp i click Build the compile", have you also put comment on C_BaseViewModel::ShouldFlipViewModel (as it says in the tutorial)?

The tutorial is here: http://developer.valvesoftware.com/wiki/Importing_CSS_Weapons_Into_HL2
Lev ditt liv som en helg
Hona
1337 p0st3r
1337 p0st3r
 
Joined: Sun Jan 08, 2006 7:15 pm
Location: Sweden

Postby Sauce on Tue Apr 24, 2007 8:43 pm

isn't shift+f7 just compile, without the build part, so it basically checks for syntax errors.

or is that shift+f5?
Image
Blink wrote:Do you watch porn and decide you don't need to have sex because you've seen the ending? :-D

zombie@computer wrote:what retarded countries measure in stones anyway?
or feet? or inches? Your dick is a lot longer in cms
User avatar
Sauce
Senior Member
Senior Member
 
Joined: Sat Nov 26, 2005 4:36 am
Location: Australia

Return to Programming

Who is online

Users browsing this forum: No registered users