Battlefield Modding Tutorials BFMODS https://battlefieldmodding.com/ssm/phpBB3/ |
|
is it hardcoded? https://battlefieldmodding.com/ssm/phpBB3/viewtopic.php?f=3&t=4608 |
Page 1 of 3 |
Author: | mrhowdoimod [ Wed Jan 14, 2009 8:48 pm ] |
Post subject: | is it hardcoded? |
I can't find in the hand weapons where it says what button is fire and zoom. because I'd like to work on a melee system for vanilla. press "e" and (with the proper animations) you will throw a melee attack with gun which will use a knife projectile. At least that's the idea. I'm not sure it's possible serverside or not. so is the fire/zoom buttons hard coded into the game? thanks |
Author: | Why Two Kay [ Thu Jan 15, 2009 2:35 am ] |
Post subject: | Re: is it hardcoded? |
No. That can not be done. Only certain buttons can fire weapons, and E would have to be assigned to something by the client anyway. In effect you would be hard-coding something that is not found inside the con files of the game anyway. This game does not support good keybinds and only uses macros to describe what key does what, not necessarily what it is bound to. You might be able to do it with right-click, see Bayonet in Road to Rome. |
Author: | Archimonde0_0 [ Thu Jan 15, 2009 2:51 am ] |
Post subject: | Re: is it hardcoded? |
Well it is possible to modify the keys to fire the weapons, for instance I could change the zoom from the Alt Fire (right click) to another command, its just conflicting with whatever else is using that command. There is a way to script new keys into the game, the files can be found in BF1942 settings folders, and you can re-arrange the scripts so different keys are used to different commands, for instance theres no need for the fire button to use both, Mouse click and the space bar for airplanes, so you could change that so that there is only the mouse click, then use that defined Control method apply it to something else. You could also certaintly get the animations to play, animation triggers can be scripted with a few hours of work, so yes technically I could script the gun to bayonet thrust when I right click, but thats where the good things end and the problems begin. I've tried long and hard to try and get a gun to fire a secondary projectile, much like the Machine guns on the tanks, and It just doesnt seem to work, not matter how hard I try. |
Author: | mrhowdoimod [ Thu Jan 15, 2009 3:44 am ] |
Post subject: | Re: is it hardcoded? |
Well I was hoping that I could do that. Hmm... I'm not sure what I can do. I tried adding the code ObjectTemplate.InputFire c_PIDrop into the colt objects.con. it broke the trigger completely. if you can't seem to get a gun to shoot two different projectiles then how can the one in ROR do it? It doesn't actually shoot a bullet out but same idea with the bayonetprojectile. |
Author: | Archimonde0_0 [ Thu Jan 15, 2009 4:45 am ] |
Post subject: | Re: is it hardcoded? |
you inspired me, and I figured it out! I've not got the bayonet animation working on the alt fire as opposed to a zoom, and a bayonet secondary fire for the No4, and it works! I'm thinking itll be useful come time I start working on pirates again, now I just gotta see if the Walk animation can be edited to make sprint. |
Author: | mrhowdoimod [ Thu Jan 15, 2009 4:45 pm ] |
Post subject: | Re: is it hardcoded? |
Author: | Archimonde0_0 [ Thu Jan 15, 2009 7:36 pm ] |
Post subject: | Re: is it hardcoded? |
Actually yes, what we do is we make a second set of animations, that link to each other, those animations raise the iron sights of the weapon, using the C_PIWalk command, for shooting, the Alt Fire or right click serves as the bayonet thrust, and the left click as the rifle shot. It would take a little work but with the proper coding I believe its more than possible |
Author: | BoBD@N!tr¤ [ Fri Jan 16, 2009 7:32 pm ] |
Post subject: | Re: is it hardcoded? |
Hi I'm working on my old minimod trying to put more features in there...might be usefull for BfV2 btw ![]() Ok so i started with shovel and then thought i could bring it to rifles To make it short, i've set an alt weapon with plantation knife animation that when you press RMB, you switch to the killing shovel That's BfV, so when you spawn with an engineer kit and select shovel, you get the killing one cause you don't have the tunnel (NVAshovel is set to cantSelectWhenNoAmmo 1) If you're carrying the tunnel you still can switch at will from an weapon animation to another. cause i did this trick with M16 as a start on rifles So that thing disabled the zoom and now i press RMB i switch to a different animation i called M16hit where the soldier hold his weapon reversed and uses it for melee (i'd like to make it more real but that's just tests i'm doing so i still use the plantation knife animation that fits perfect btw) Now here's the problem i get to: Shovel works perfect and i can switch when i want, but the M16 i can't switch to M16hit when the mag is empty Dunno if i'm clear...my first magasin isn't empty yet, i can switch weapons>when it's empty i can't switch (that's where it would be interesting to have it)...then i reload the M16 and can switch again ![]() Even with changeWeaponWhenNoAmmo 1 that only works when soldier runs out of magasins... The only solution i see for now is one mag only wich sux big time ![]() ***EDIT***Autoreload 1 is a solution (dunno why i always have is unchecked...) Now what am i doing here? i'm interseted with that PIwalk story for the zoom ![]() |
Page 1 of 3 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |