修改盔甲遇上难题了
我想修改FOOK和FWE的装甲,使用了rlen大哥编的程,为盔甲增加了防御值----------------------------------------
scn testscript
short on
float hp0
float hp1
float hp2
float hp3
float hp4
float hp5
float hp6
float dmg0
float dmg1
float dmg2
float dmg3
float dmg4
float dmg5
float dmg6
Begin onequip
set on to 1
set hp0 to player.getav health
set hp1 to player.getav EnduranceCondition
set hp2 to player.getav PerceptionCondition
set hp3 to player.getav LeftAttackCondition
set hp4 to player.getav RightAttackCondition
set hp5 to player.getav LeftMobilityCondition
set hp6 to player.getav RightMobilityCondition
End
Begin onunequip
set on to 0
End
Begin gamemode
if on == 1
set dmg0 to hp0 - player.getav health
if dmg0 > 0
set dmg1 to hp1 - player.getav EnduranceCondition
set dmg2 to hp2 - player.getav PerceptionCondition
set dmg3 to hp3 - player.getav LeftAttackCondition
set dmg4 to hp4 - player.getav RightAttackCondition
set dmg5 to hp5 - player.getav LeftMobilityCondition
set dmg6 to hp6 - player.getav RightMobilityCondition
if dmg0 < 100
player.restoreav health dmg0
player.restoreav EnduranceCondition dmg1
player.restoreav PerceptionCondition dmg2
player.restoreav LeftAttackCondition dmg3
player.restoreav RightAttackCondition dmg4
player.restoreav LeftMobilityCondition dmg5
player.restoreav RightMobilityCondition dmg6
return
else
set hp0 to player.getav health
set hp1 to player.getav EnduranceCondition
set hp2 to player.getav PerceptionCondition
set hp3 to player.getav LeftAttackCondition
set hp4 to player.getav RightAttackCondition
set hp5 to player.getav LeftMobilityCondition
set hp6 to player.getav RightMobilityCondition
endif
endif
endif
End
----------------以上是防御值,下面是FOOK夜视仪脚本--------------------
ScriptName FOOKNVGScript
; by HugePinball
; Controls NV interface
; non-FOSE safe
; Option variables
; short FOOKNVGOptions.useActivator
; short FOOKNVGOptions.useWarningBeeps
; short FOOKNVGOptions.useMessages
; short FOOKNVGOptions.NVMeterType ; 0 = No meter
float charge
float chargePercent
short fullCharge
short isOn
short turningOn
short NVEquipped
short curKey
short beeped
short sec
Begin GameMode
set chargePercent to charge/60
; NV Charge Meter code:
if FOOKNVGOptions.NVMeterType
if FOSE.isPresent && NVEquipped
SetUIFloat "HUDMainMenu_NVCharge" chargePercent
endif
elseif FOSE.isPresent
SetUIFloat "HUDMainMenu_NVCharge" -1
endif
; low charge warning beeps
if NVEquipped && isOn && FOOKNVGOptions.useWarningBeeps
if beeped == 0 && charge < 10 && charge > 0
PlaySound FOOKNVGChargeBeep
set beeped to 1
endif
if charge < sec
set beeped to 0
set sec to sec - 1
endif
endif
; code to keep track of NV charge:
if charge > 0
if isOn
set charge to charge - GetSecondsPassed
elseif charge < 60
set charge to charge + (GetSecondsPassed * 2)
set fullCharge to 0
else
if fullCharge == 0
set fullCharge to 1
if FOOKNVGOptions.useMessages
ShowMessage FOOKNVGChargedMsg
endif
endif
endif
elseif isOn
set isOn to 0
set sec to -1
if FOOKNVGOptions.useMessages
ShowMessage FOOKNVGDischargedMsg
endif
if FOOKNVGOptions.useActivator
player.UnequipItem FOOKNVGActivator 0 1
endif
else
set charge to charge + (GetSecondsPassed * 2)
endif
; code to toggle NV on/off:
; only toggle while NV headgear equipped
if NVEquipped
if FOSE.isPresent && FOOKNVGOptions.useActivator != 1
; if 'n' key still held, skip loop
if IsKeyPressed curKey && curKey
return
else
set curKey to 0
endif
; when 'n' key pressed, toggle nv mode
if IsKeyPressed 49
if isOn == 0
set sec to charge
set beeped to 1
set isOn to 1
else
set isOn to 0
endif
set curKey to 49
endif
else
if player.GetEquipped FOOKNVGActivator
if isOn == 0
set sec to charge
set beeped to 1
endif
set isOn to 1
else
set isOn to 0
endif
endif
; if NV should be on, make sure NV effect is on
if isOn
if IsImageSpaceActive FOOKNVGISMGreen == 0 && (player.GetEquipped FOOKNVGBoSHeadgear || player.GetEquipped FOOKNVGDefaultHeadgear)
imod FOOKNVGISMGreen
PlaySound FOOKSDUINVOn
set turningOn to 1
elseif IsImageSpaceActive FOOKNVGISMRed == 0 && player.GetEquipped FOOKNVGEnclaveHeadgear
imod FOOKNVGISMRed
PlaySound FOOKSDUINVOn
set turningOn to 1
elseif IsImageSpaceActive FOOKNVGISMAmber == 0 && player.GetEquipped FOOKNVGOutcastHeadgear
imod FOOKNVGISMAmber
PlaySound FOOKSDUINVOn
set turningOn to 1
elseif IsImageSpaceActive FOOKNVGISMYellow == 0 && player.GetEquipped FOOKNVGTribalHeadgear
imod FOOKNVGISMYellow
PlaySound FOOKSDUINVOn
set turningOn to 1
elseif IsImageSpaceActive FOOKNVGISMAqua == 0 && player.GetEquipped FOOKNVGWinterizedHeadgear
imod FOOKNVGISMAqua
PlaySound FOOKSDUINVOn
set turningOn to 1
endif
if FOOKNVGOptions.useMessages && turningOn
set chargePercent to charge/60 * 100
ShowMessage FOOKNVGChargeLevelMsg chargePercent
endif
set turningOn to 0
if FOSE.isPresent
SetUIFloat "HUDMainMenu_NVOn" 1
endif
; if NV should be off, make sure NV effect is off
elseif IsImageSpaceActive FOOKNVGISMGreen || IsImageSpaceActive FOOKNVGISMRed || IsImageSpaceActive FOOKNVGISMAmber || IsImageSpaceActive FOOKNVGISMYellow || IsImageSpaceActive FOOKNVGISMAqua
rimod FOOKNVGISMGreen
rimod FOOKNVGISMRed
rimod FOOKNVGISMAmber
rimod FOOKNVGISMYellow
rimod FOOKNVGISMAqua
PlaySound UIPipBoyLightOff
if FOSE.isPresent
SetUIFloat "HUDMainMenu_NVOn" 0
endif
endif
endif
; in case activator status changed when already has NV gear in inventory
if FOOKNVGOptions.useActivator && player.GetItemCount FOOKNVGActivator == 0
player.AddItem FOOKNVGActivator 1 1
elseif FOOKNVGOptions.useActivator == 0 && player.GetItemCount FOOKNVGActivator
player.RemoveItem FOOKNVGActivator 1 1
endif
endif
End GameMode
Begin OnEquip player
set NVEquipped to 1
set fullCharge to 1
if FOOKNVGOptions.NVMeterType
if FOSE.isPresent
SetUIFloat "HUDMainMenu_NVCharge" chargePercent
endif
elseif FOSE.isPresent
SetUIFloat "HUDMainMenu_NVCharge" -1
endif
if FOOKNVGOptions.useMessages
set chargePercent to charge/60 * 100
ShowMessage FOOKNVGChargeLevelMsg chargePercent
endif
End
Begin Onunequip player
set NVEquipped to 0
set isOn to 0
rimod FOOKNVGISMGreen
rimod FOOKNVGISMRed
rimod FOOKNVGISMAmber
rimod FOOKNVGISMYellow
rimod FOOKNVGISMAqua
if FOSE.isPresent
SetUIFloat "HUDMainMenu_NVCharge" -1
endif
End
Begin OnAdd player
if FOOKNVGOptions.useActivator && player.GetItemCount FOOKNVGActivator == 0
player.AddItem FOOKNVGActivator 1 1
endif
End
Begin OnDrop player
if FOOKNVGOptions.useActivator && player.GetItemCount FOOKNVGActivator && player.GetItemCount FOOKNVGBoSHeadgear == 0 && player.GetItemCount FOOKNVGDefaultHeadgear == 0 && player.GetItemCount FOOKNVGEnclaveHeadgear == 0 && player.GetItemCount FOOKNVGOutcastHeadgear == 0 && player.GetItemCount FOOKNVGWinterizedHeadgear == 0
player.RemoveItem FOOKNVGActivator 1 1
endif
End
---------------------------------------------------------------
防御值无法和FOOK的夜视仪脚本相和,如果另外做夜视仪的话第一是缺少模型,再就是必须在装备动力装甲下使用。
所以现求助整合脚本,或者动力盔甲夜视仪模型。(就是罐头头上的那扫描仪就可以) 一定要动力甲夜视仪吗,普通士兵用夜视仪模型我有..动力甲夜视仪应该长什么样? 动力盔甲头上的扫描仪就可以 要不这样吧,求助怎样在装备一件装备时添加另一件装备并强制穿戴 要不这样吧,求助怎样在装备一件装备时添加另一件装备并强制穿戴
qjyuio 发表于 2010/1/20 12:34:00http://3dmgame.chnren.com/bbs/images/common/back.gif
这个很简单,只要你会用GECK就行了.
有俩种方法,
1.装备单独拆分法.头部装备其实分头发用,头部用,脸用,眼睛用装备等几个部分,一般大头盔(遮住脸的),会设置为同时关联之前所有部分..因此任何头部装备带上去时都会和它的关联产生冲突,你只要把动力甲和眼睛的关联去处.再把夜视仪设置为眼睛用装备带上即可.
2.把夜视仪设置为附加物品,然后在将其关联到动力甲头盔上...FO3里很多模型都是这样设置的,比如手套,比如动力甲的背包.这样比较简单,不用穿好几件装备,一个头盔就行饿
但是如果你夜视仪自带脚本的话,那还是得用第一种方法.第2种方法不带脚本 这种方法不行的,因为我没有夜视仪的模型,我要的是带上一件装备以后可以强制性的带上另一件隐藏装备 还是不行,虽然可以附加装备,但是没有任何效果... 明白了,其实可以加入装甲的,谢谢,我可以完全修改了 呀……不妨下载个奴隶套装看看,里面有个targeter的模型就是从动力盔甲上弄的。里面也有夜视仪的脚本,比较简单没有消耗电池的设置。
页:
[1]