Dual Weapons
Dual Weapons
A feature I would like to see, but find very un-essential, is the option to wield dual weapons. I would like to see a halo2 type system, but even simply something like adding dualwield=true to the weapon entry having the effect of telling rf to mirror the weapon model to the other side and treat them as seperate weapons would work.
-
- Posts: 866
- Joined: Fri Jul 08, 2005 4:27 am
- Location: PA, USA
He he he, I have been working on a duel weilding gun system for in my current game project. Its not a built in function and you cant do it with only one character file with its animations. The animations would get buggy unless you coded it with bone rotation(Thats not possible is it? If it is, this is easier than I thought and rag doll becomes an imidiate possibility with scripting. back to the duel guns thing.) Kinda complicated though. Uses scripted players and uses multiple models. I dont want to give away my secret on how this is done until I have somthing to show. And I might have said too much already. I guess I will have to post my results for you guys whenever I can get a working demo ready. But my progress is slow. I might not get anything playable for a long while.
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
i dont know anything about programming or scripting, but u have got the basic information for the weapons already used, just remodel a the charactor to have another arm on the left to be exaxtly the same as the right, then copy the code and atach it to the left hand and change the firing buttons for it.
as i sed i dont know anything about this sort of stuff the most i have ever done was made a flash card program for a college course using vb.net, i would like to learn more about programing so if there is any thing you suggest to read it would be nice, i am only 16 and i dont want one of those confusing manual type stuff, an easy walkthrough or somthing would be useful.
as i sed i dont know anything about this sort of stuff the most i have ever done was made a flash card program for a college course using vb.net, i would like to learn more about programing so if there is any thing you suggest to read it would be nice, i am only 16 and i dont want one of those confusing manual type stuff, an easy walkthrough or somthing would be useful.
*GD*
-
- Posts: 866
- Joined: Fri Jul 08, 2005 4:27 am
- Location: PA, USA
lol, I trust everyone here that they wont steal my ideas. I was kiding about the saying too much. I just dont want to tell how to do it and then have someone else make a version of it before I get a chance to. Because my version will be just like HALO 2, but better(I hate the no control of the left hand , I will have it able to choose what hand to use to hold/fire a weapon ! And no toss the gun game to duel weild the gun you want when you want to keep the gun in the left hand .) I hope I get a chance to post a demo or doc about it when I have it perfected.(or even started, I have devised the way to do it in my mind, but have to 3d model a character for this and script everything yet too! I am nearing the end of modeling the character though, but then have to animate with yet to be modeled guns.)GD1 wrote:it's not too hard. I myself may be working on this again soon too. it won't be advanced as Halo2 but probably more along the lines of Perfect Dark.
dont worry, MoG, i wont steal your ideas
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
main issue is...
the problem with setting up dual weapons systems is mainly the animations that are required.
For first person ONLY it would be alot easier than for 3rd.
it's not as simple as just copying the code for one gun and adding it again for a second gun - not nearly as simple.
you need to not only add code for handling the input for the second weapon (which can be done via script very easily), but you need to blend animations so that the character can be doing multiple things at one time. this isn't too huge of an issue, genesis & rf does allow motion blending, but if you want to customize how actors play their animations, this requires some major code changes to the player code to handle motion blending etc...i started on some code to do this, but it's not complete.
for example:
gun #1 & gun #2 need to be able to trigger any of their animations at any time to allow for true 'dual' weapons - so gun #1 may be doing an idle animation while gun #2 is firing for example, or vice versa.
plus both of these animations need to be able to start AND finish at any point in time - so Gun#1 may be idleing at frame 1 while gun#2 is playing the fire animation at frame #10 (or whatever combination).
this complicates the animation process considerably, particularly with how the rf player code is handled.
the player code currently has a 'current motion' and a 'next motion' that are blended between (or can be). you'd need to rewrite it so that there can be numerous animations played at once and triggered at any point in time...
for third person the process becomes a LOT more complicated
for first person view though it is feasible, just use completely seperate actors (perhaps all controlled by script even) and use the key handler routines to trigger the animations independtly - this is by far the simplest way to do it. ignore the default player animation/control code and create your own via pawns - attach the pawns to the player and they can do wahtever they want independent of the player movement and animations
For first person ONLY it would be alot easier than for 3rd.
it's not as simple as just copying the code for one gun and adding it again for a second gun - not nearly as simple.
you need to not only add code for handling the input for the second weapon (which can be done via script very easily), but you need to blend animations so that the character can be doing multiple things at one time. this isn't too huge of an issue, genesis & rf does allow motion blending, but if you want to customize how actors play their animations, this requires some major code changes to the player code to handle motion blending etc...i started on some code to do this, but it's not complete.
for example:
gun #1 & gun #2 need to be able to trigger any of their animations at any time to allow for true 'dual' weapons - so gun #1 may be doing an idle animation while gun #2 is firing for example, or vice versa.
plus both of these animations need to be able to start AND finish at any point in time - so Gun#1 may be idleing at frame 1 while gun#2 is playing the fire animation at frame #10 (or whatever combination).
this complicates the animation process considerably, particularly with how the rf player code is handled.
the player code currently has a 'current motion' and a 'next motion' that are blended between (or can be). you'd need to rewrite it so that there can be numerous animations played at once and triggered at any point in time...
for third person the process becomes a LOT more complicated
for first person view though it is feasible, just use completely seperate actors (perhaps all controlled by script even) and use the key handler routines to trigger the animations independtly - this is by far the simplest way to do it. ignore the default player animation/control code and create your own via pawns - attach the pawns to the player and they can do wahtever they want independent of the player movement and animations
-
- Posts: 866
- Joined: Fri Jul 08, 2005 4:27 am
- Location: PA, USA
-
- Posts: 866
- Joined: Fri Jul 08, 2005 4:27 am
- Location: PA, USA
Ok, I cannot let you guys totally in the dark. My system will have the players arms as seperate scripted objects just as gekido said a few posts up. Then the animations will be smooth no mater what animation the player is in.
I hope I can put togeteher a good FAQ/walkthrough/tutorial when I am done. That way, it will be easy to get everything right the first time you attempt this.
Also, if the new physics that are being integrated give you forces to be applied to bones, you could have a character model be whole and forces applied to the bones would animated the recoil from firing. It would be cool if the physics let you script the bones to do what you want. This way you could use scripting to have the reload animation, etc. Acctually you could have invisible objects attach to the bones and have them move to make the reload animations etc, just like a puppet(this would make the players arms in a constant state of controled rag doll). Anyway. Im not sure what the physics system will allow, so I am planning on the seperate objects thing. But if the physics allow what I just said above, I can assure you that thats the way I will go, because then the character modles will look much better. Either way I will try to finish this(hope so, its a major part of my game!) and post my results.
I hope I can put togeteher a good FAQ/walkthrough/tutorial when I am done. That way, it will be easy to get everything right the first time you attempt this.
Also, if the new physics that are being integrated give you forces to be applied to bones, you could have a character model be whole and forces applied to the bones would animated the recoil from firing. It would be cool if the physics let you script the bones to do what you want. This way you could use scripting to have the reload animation, etc. Acctually you could have invisible objects attach to the bones and have them move to make the reload animations etc, just like a puppet(this would make the players arms in a constant state of controled rag doll). Anyway. Im not sure what the physics system will allow, so I am planning on the seperate objects thing. But if the physics allow what I just said above, I can assure you that thats the way I will go, because then the character modles will look much better. Either way I will try to finish this(hope so, its a major part of my game!) and post my results.
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
-
- Posts: 866
- Joined: Fri Jul 08, 2005 4:27 am
- Location: PA, USA
That would work, but would be like Goldeneye(for N64) or the Timespitters series(GCN PS2 XBOX) .
Its much more complicated to get it like Halo 2 because each arm has the possibility to fire at any given moment. And when you fire your right hand gun the left hand with a gun shouldnt move at all. There are also some other glitches that would be very crude to have to watch throughout the whole gaming experiance. These glitches would be animation jumps when you would fire both guns at seperate times but quick enough to reset the fire animation. Very bad things to watch over and over again while playing a game. I am still working on my duel guns system and once I get results Ill report back and maybe have a tutorial.(still have alot of work on my game before I can script characters though.)
Its much more complicated to get it like Halo 2 because each arm has the possibility to fire at any given moment. And when you fire your right hand gun the left hand with a gun shouldnt move at all. There are also some other glitches that would be very crude to have to watch throughout the whole gaming experiance. These glitches would be animation jumps when you would fire both guns at seperate times but quick enough to reset the fire animation. Very bad things to watch over and over again while playing a game. I am still working on my duel guns system and once I get results Ill report back and maybe have a tutorial.(still have alot of work on my game before I can script characters though.)
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
Older games had it where both weapons would fire at the same time like IGI: Operation I'm Going In. Would seem you simply need to have two model as one weapon. Then have them reload off screen.
However being able to fire them seperately is a serious task. Even if you use two seperate pawns as arms/guns. The problem I always ran into when trying to use a scripted weapon like that was the weapon pitch and position would not match the camera pitch, and position.
So it looked fine untill the player looked up or down. Then the weapon would rotate to match the camera pitch but it's position to the player wouldn't change to stay in front of the camera.
I discovered this problem when I was trying to use a scripted weapon in order to get weapon innacuracy.
However being able to fire them seperately is a serious task. Even if you use two seperate pawns as arms/guns. The problem I always ran into when trying to use a scripted weapon like that was the weapon pitch and position would not match the camera pitch, and position.
So it looked fine untill the player looked up or down. Then the weapon would rotate to match the camera pitch but it's position to the player wouldn't change to stay in front of the camera.
I discovered this problem when I was trying to use a scripted weapon in order to get weapon innacuracy.
-
- Posts: 866
- Joined: Fri Jul 08, 2005 4:27 am
- Location: PA, USA
That shouldnt be a big problem. If the arms and guns are seperate pawns, attach the gun to the arms and have the armsand guns rotate with the camera. Say, how do you get pawns to rotate with the camera x/y/z? I think that might be useful when I try to script my duel weilding charactor.
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
To go on an adventure, one must discard the comforts and safety of the known and trusted.