[Help!] with HMMWV

Making or wanting help making your own asset? Check in here
Post Reply
3===SPECTER===3
Posts: 831
Joined: 2007-05-05 01:13

[Help!] with HMMWV

Post by 3===SPECTER===3 »

Ok for a personal SP mod i have USI's open Humvee and i want to make it so that passengers can use their weapons while sitting in the truck. Ive looked through the .teaks of the M35 and Merlin but i cant find what i need to do to achieve this. Any help is appreciated.
EOD_Security-2252
Posts: 804
Joined: 2008-06-10 23:08

Re: Need Help with HMMWV

Post by EOD_Security-2252 »

I'm pretty sure the animation file determines if the player can use their weapon or not. For example, pilot animation cannot and just makes it look like players are sitting nice in their seats.

Informally retired modder - Projects: Artillery Shell IED,PSC Faction
3===SPECTER===3
Posts: 831
Joined: 2007-05-05 01:13

Re: Need Help with HMMWV

Post by 3===SPECTER===3 »

So what animation would i use for use of a weapon?
EOD_Security-2252
Posts: 804
Joined: 2008-06-10 23:08

Re: Need Help with HMMWV

Post by EOD_Security-2252 »

Code: Select all

ObjectTemplate.seatAnimationSystem Objects/Vehicles/Common/Animations/3p_codriver_A_animSys.inc
But for future references, think about a seat that already exists (say the SAW gunner in the front of the FAAV), and you want your front seat guy to use a SAW. Then, go to the FAAV's tweak file, find the part about codriver or passenger#whatever and use that animation file.

Informally retired modder - Projects: Artillery Shell IED,PSC Faction
3===SPECTER===3
Posts: 831
Joined: 2007-05-05 01:13

Re: Need Help with HMMWV

Post by 3===SPECTER===3 »

No that doesn't work. I took the animations from the M35's passengers and put it on my Humvee but i still can't use my M16.
EOD_Security-2252
Posts: 804
Joined: 2008-06-10 23:08

Re: Need Help with HMMWV

Post by EOD_Security-2252 »

Hmm, I'll look harder.

Informally retired modder - Projects: Artillery Shell IED,PSC Faction
3===SPECTER===3
Posts: 831
Joined: 2007-05-05 01:13

Re: Need Help with HMMWV

Post by 3===SPECTER===3 »

Thanks for the help so far EOD
wolfi
Retired PR Developer
Posts: 69
Joined: 2005-05-30 23:01

Re: Need Help with HMMWV

Post by wolfi »

Does your seat have a camera attached to it? If you attach a camera, you can't use an infantry weapon. If you do not attach a cam to the seat, the soldier will be kind of "on foot" and can use infantry stuff. #rem out the line that adds the camera template to your seat and see if that works.

Edit: Wait, I just saw youre talking about the USI humvee, means I should know what to do. As I didn't play with those things in a while now, I can't really remember if our humvee has a camera attached to this position so you can only try it by youself.

Edit 2: #rem out these lines (line number) and you should be fine:

Code: Select all

(490) ObjectTemplate.addTemplate usjep_hmmwvopen_codriver_Camera
(491) ObjectTemplate.setPosition -0.0505/1.3345/-0.08

(611) ObjectTemplate.addTemplate usjep_hmmwvopen_rightpass_Camera
(612) ObjectTemplate.setPosition 0/1.32508/0

(732) ObjectTemplate.addTemplate usjep_hmmwvopen_leftpass_Camera
(733) ObjectTemplate.setPosition -0.005/1.24402/0
Last edited by wolfi on 2008-08-25 00:57, edited 1 time in total.
Image
EOD_Security-2252
Posts: 804
Joined: 2008-06-10 23:08

Re: Need Help with HMMWV

Post by EOD_Security-2252 »

Ok, I might have got it now.

Code: Select all

ObjectTemplate.setSoldierExitLocation 1/1/1 0/0/0
ObjectTemplate.altSoldierExitPosition 1.5/1/-2
ObjectTemplate.dontClearTeamOnExit 1
ObjectTemplate.seatInformation xpak_civ1_PlayerControlObject_FrontPassenger -0.187014/0.414582/-0.0122744 0/0/0
ObjectTemplate.seatAnimationSystem Objects/Vehicles/xpak_vehicles/xpak_civ1/xpak_civ1_passAnimationSystem.inc
ObjectTemplate.seatLeftRotationLimit -3600
ObjectTemplate.seatRightRotationLimit 3600
ObjectTemplate.toggleWeapon 1
ObjectTemplate.autouseability 0
ObjectTemplate.hasRestrictedExit 1
ObjectTemplate.altSoldierExitPosition 1.5/1/-2
ObjectTemplate.isOpenVehicle 1
See where it says toggle weapon. That code comes from the civilian car's front passenger. So, try inserting that toggleweapon line of code into your vehicle in the correct spot; however, you'll be wanting toggleWeapon to be set to 0 instead of 1.

Informally retired modder - Projects: Artillery Shell IED,PSC Faction
3===SPECTER===3
Posts: 831
Joined: 2007-05-05 01:13

Re: Need Help with HMMWV

Post by 3===SPECTER===3 »

Ok thanks guys ill give them both a try right away.

Edit: Yes gazzthompson like generation kill lol but i didnt do it based off that i tried putting a 50 on it and then i just said screw it they can use their own stuff.

Edit2: ok I used wolfi's method and it worked. now i need to make it so the player can turn a little more each way so hes more effective while shooting. anyway to do this?
Last edited by 3===SPECTER===3 on 2008-08-25 02:09, edited 1 time in total.
wolfi
Retired PR Developer
Posts: 69
Joined: 2005-05-30 23:01

Re: Need Help with HMMWV

Post by wolfi »

Add these lines right below the animation system line (for each of the three seats of course):

Code: Select all

ObjectTemplate.seatLeftRotationLimit -15
ObjectTemplate.seatRightRotationLimit 15
You can play with the values. That should do the trick.
Image
3===SPECTER===3
Posts: 831
Joined: 2007-05-05 01:13

Re: Need Help with HMMWV

Post by 3===SPECTER===3 »

OK thanks wolfi i finally got it to work. U suld see how good the AI is at picking of insurgents on the move. ;)
arjan
Posts: 1865
Joined: 2007-04-21 12:32

Re: Need Help with HMMWV

Post by arjan »

pic's ? :) lil movie :) ?
Post Reply

Return to “PR:BF2 Community Modding”