Fire and Saw on the fly (need NVSE dev help~)

Post » Sat Feb 19, 2011 12:09 pm

I've implemented a sawable machine gun, and the demostration looks like the video and picture below.

[media]http://www.youtube.com/watch?v=HMWuhCyIcZs[/media]
[img]http://img843.imageshack.us/img843/3361/gunsawall.jpg[/img]

However, the control is a disaster since the weapon switching mechanism is somehow buggy... I've tried to set this gun a melee weapon, and the saw works fine. In the opposite, if I set this gun to be a 2-hand automatic rifle, switching to saw mod need to press fire button TWICE and MUST press in a propey seperated time, making the control awful...

Now my script to make gun sawable is looks like

==============================================================================================================
if IsEquip ==1 && Player.IsWeaponOut && WaitTime<=0
if IsKeyPressed 258 ;middle mouse button
if phase==0 && (Player.GetAnimAction == -1) ;cannot switch when firing ;function IsPlayerActionActive is in slow response...
;switching to chainsaw mode
printc "switch to chainsaw mode"
SetWeaponType 2
SetWeaponAttackAnimation 10
;set WaitTime to 0.05
set Holdtime to 0.1
set phase to 1
elseif phase ==1 ;trigger the melee weapon
tapControl 4
if HoldTime <=0
set WaitTime to 0.1
set phase to 2
endif
elseif phase ==2 ;holding fire
tapControl 4
endif

elseif phase !=0
printc "switch to gun mode"
set phase to 0 ;switch back to gun mode
SetWeaponType 6
SetWeaponAttackAnimation 8
endif
endif
=========================================================================


mm..Here is my problem to the NVSE team(really thanks for your fantastic work), "SetWeaponType" function may not work properly for melee weapons ( 2hmattackspin.kf in this example), and I've also tried to play attackspin when the weapon type is still the rifle; it work fine except the gun firing and no meele effect of course. If the mod file helps for the developing, pm me (I need to repack it).
User avatar
pinar
 
Posts: 3453
Joined: Thu Apr 19, 2007 1:35 pm

Post » Sat Feb 19, 2011 3:42 am

OMFG SOMEONE HELP THIS PERSON. MUST HAVE MOD.
User avatar
roxanna matoorah
 
Posts: 3368
Joined: Fri Oct 13, 2006 6:01 am


Return to Fallout: New Vegas