| closedButt-stroke for all wepons ? |
| Started by TigerMan4 on 12-28-2006, 10:02 AM |
Threads: 37
Joined: Aug 2006
Having played Red Orchestra , I have found it nice to be able to Klunk people with every gun when you are in the heat of the battle and can`t reload fast enough.rnrnIs there anyone who can write a plugin that will give anyone with a rifle the ability to klunk people ? or is it not possible ?rnrnI think this would be a good addition to the ( no , no-scope plugin )rnrnIf you can`t no scope someone at close range , you could butt them.rnrnanyone ?
Threads: 103
Joined: May 2005
well to actually have the weapons buttstock swing you would have that animation in each weapon..nnbut zor was working on a brass knuckles plugin a while ago that let you punch ppl while holding any (i think) weapon.. but im not sure how far he got with it..
Threads: 75
Joined: Jun 2006
It was swinging the thing...but it was all fucked up! I was trying!! Heheheh....not sure where it went to Im on my laptop in LV so I dont have access to all my plugins, however it may be somewhere here in the forums or on the old forums...or in the files!nnCheers!
Threads: 37
Joined: Aug 2006
well,,,I know with my K43 , I dont see myself swing the gun at all , I hear the noise but I dont see the annimation....I see it when others do it , or when I use the garand , but not the K43 in my own hands.rnrnso , if you left out the annimation , and gave the sniper rifle , and the MGs a Klunk-mode.rnrnwould it work ?
Threads: 103
Joined: May 2005
you dont see the animation on your own screen for k43?nndo you use a custom model for it??
Threads: 37
Joined: Aug 2006
nope, never have , and have never seen the annimation when I`m the one using the K43 to klunk , I see it when others do it , but not when I do ( I hear the wooosh )rnrnthe only custom models I use are for the Scoped rifles ( bolt action ones ) and for the player models.rnrnbut no other guns ( well dual .45 grease guns done count ) LOL
Threads: 1
Joined: Jun 2006
I also have the same issue with my K43 animation. But, as what I figured to be an explanation I have the Ultra Realism Mod installed on my computer which completely revamps all of DoD (quite impressive actually, I believe Fileplanet has it if you're interested)...so, that's my excuse anyways...but, I'm totally into a Klunk function for all weapons...I was rather annoyed that in 1.6 the k43 was given a klunk but the carbine was not....but I think the idea of an MG-42 soldier swinging his machine gun at an ally like a 9 iron would make me pee myself laughing....
Threads: 57
Joined: Oct 2005
Actually I like this idea a lot.rnrnDiamond, your shellshock plugin actually makes the weapon model swing quite a bit - we could probably even make it look like the weapon is swinging.rnrnBut how to code in the aim, etc....ugh that gets hectic..any ideas on this, from a developing standpoint, developers?
Threads: 75
Joined: Jun 2006
Well in reality all you need to do is capture the alternate fire, check to see if its a weapon that can do a butt hit, execute an animation using pev(pev_sequence, whatevernumber) then Set the nextthink time to 2 seconds from time of execution using pev(pev_nextthink, HLTIME+2.0), then then next prethink check to see if its good to shoot it again. The player models all have the following:nnstand_rifle_swingncrouch_rifle_swingnprone_rifle_swingnnSo if you define the following:nn#define STAND_RIFLE_SWING 33n#define CROUCH_RIFLE_SWING 34n#define PRONE_RIFLE_SWING 35nnThen use that with the pev(pev_sequence, STAND_RIFLE_SWING) it will work...remember to check to see if there was contact with a player / player and that one of those players is swinging his weapon, you can do this with register_touch("player", "player", "function_player_hit_player") or some such, then you should be able to do the damage and checking in there.nnCheers!
Threads: 57
Joined: Oct 2005
If making players perform a sequence were that easy I'd be sitting in a LayZBoy sofa right now.rnrnI know how to make players perform sequences, but it's nowhere near that easy. That's a very good idea, and I also figured out a way to simulate it client sided even though there is no v_animation for every gun.rnrnBasically works like a screenshake, sending a pev_punchangle to 0.0 -30.0 0.0 it shakes your screen and will come as close to a riflebutt look as I think we can get it.rnrnBut the question remains..how do you test to see if you hurt someone and use hitboxes etc.? That's the pain in the ass..can you think of an easy way?
Threads: 103
Joined: May 2005
well you can check to see if theres a player within a certain radius.. (i do this with my animal plugin stuff so you can knife/buttstock the animals.. tho that code isnt exactly public lol) and use where they're aiming to get hitbox.. i think tatsu has done the hitbox stuff in one of his plugins..
Threads: 54
Joined: May 2005
;3237']n nBut the question remains..how do you test to see if you hurt someone and use hitboxes etc.? That's the pain in the ass..can you think of an easy way?n ndetect when a player presses a certain button (attack)n nget the killers origin on "attack" and get what he/she is aiming at... n nif aiming at a person the function (get_user_aiming) returns "where" (bodypart) the person is aiming at IF we are aiming at a person nIF we are aiming at a person it returns their id... get their origin.. nthen simply "measure" the distance between your origin and theirs and test against some value....n nif within "range" execute some fake damage...n n n
n...nget_user_origin(id,killerOrigin,0); // Current location the player is atn n...n nget_user_aiming(id,victim,bodypart)n n...n n n// Get the position of the playern get_user_origin(victim, victimOrigin) n n // Get distancen distance = get_distance(killerOrigin, victimOrigin)n n // Check who is standing closen if(distance <= 150)n {n...nn ntheir is a whole lot more to it...nthe code in the damage mod that deals with the medic uses this system for healing... and I am currently using it again in the plugin I am currently writing (wyvern)
