战地资源网

 找回密码
 立即加入
搜索
查看: 1993|回复: 2

询问一个关于载具的问题

 关闭 [复制链接]

6

主题

28

回帖

163

积分

下士

发表于 2024-7-29 22:09:59 | 显示全部楼层 |阅读模式
5金币
问一下各位大佬,我从moddb下的载具,按x键,在释放烟雾的同时,也会造成载具的视角缩放,请问如何把这两者设计的不冲突呢

最佳答案

查看完整内容

可以参考一下,这个是之前资源网里发的,先把X改成缩放,再把烟雾弹改成其他或者3号键位,不冲突就可以。 (1)打开载具的CON文档,在其有关炮塔坐标定义属性里面加入代码(基本是在BarrelBase下面添加) ObjectTemplate.create RotationalBundle USA_M1A2D_SEPV4_barrel_base ObjectTemplate.collisionPart 2 ObjectTemplate.hasCollisionPhysics 1 ObjectTemplate.physicsType 3 ObjectTemplate.hasMobilePhysics 1 ObjectTem ...
回复

使用道具 举报

6

主题

41

回帖

842

积分

上士

八一勋章

发表于 2024-7-29 22:10:00 | 显示全部楼层
可以参考一下,这个是之前资源网里发的,先把X改成缩放,再把烟雾弹改成其他或者3号键位,不冲突就可以。
(1)打开载具的CON文档,在其有关炮塔坐标定义属性里面加入代码(基本是在BarrelBase下面添加)
   ObjectTemplate.create RotationalBundle USA_M1A2D_SEPV4_barrel_base
ObjectTemplate.collisionPart 2
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType 3
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.geometryPart 2
ObjectTemplate.addTemplate USA_M1A2D_SEPV4_barrel
ObjectTemplate.setPosition -0.0782/-0.4491/0.4207
ObjectTemplate.addTemplate FlareFireCameraSwitch_alt    ---加入此句代码

(2)在驾驶员视角属性中加入(例如:S_ustnk_Driver_Camera_RotationRpm)
ObjectTemplate.addTemplate tank_x_sight_camera   此句-------同时也要把主驾驶的视角坐标给其复制再粘贴到此句下面(与主视角位置相同),否则容易导致视角错误

(3)把你的烟幕弹去掉或者改成3号键等其他键位发射烟幕弹
也可以用下属的替换掉你原来的烟幕弹(XXXXXXXX---为名称,你的载具或者其他你希望的名字)
ObjectTemplate.addTemplate XXXXXXXX_SmokeLauncher


ObjectTemplate.create GenericFireArm XXXXXXXX_SmokeLauncher
ObjectTemplate.createdInEditor 1
rem ---BeginComp:WeaponHud ---
ObjectTemplate.createComponent WeaponHud
ObjectTemplate.weaponHud.selectIcon Ingame\Weapons\Icons\Hud\Selection\hgr_smoke.tga------这个图片你没有的话可以删掉
ObjectTemplate.weaponHud.hudName "Smoke"
ObjectTemplate.weaponHud.guiIndex 304------准星代码,也可以改成-1  就是没有准星
ObjectTemplate.weaponHud.hasFireRate 0
ObjectTemplate.weaponHud.hasRangeFinder 1
ObjectTemplate.weaponHud.displaySelectOnActivation 1
rem ---EndComp ---
rem ---BeginComp:MultiFireComp ---
ObjectTemplate.createComponent MultiFireComp
ObjectTemplate.fire.roundsPerMinute 1800
ObjectTemplate.fire.addFireRate 1
ObjectTemplate.fire.burstSize 4---一次发射烟幕弹的数量;注意把X键发射改成左键发射
ObjectTemplate.fire.addBarrelName XXXXXXXX_SmokeLauncher_Barrel
rem ---EndComp ---
rem ---BeginCompefaultAmmoComp ---
ObjectTemplate.createComponent DefaultAmmoComp
ObjectTemplate.ammo.nrOfMags 12---弹夹数
ObjectTemplate.ammo.magSize 4------弹夹内弹数量
ObjectTemplate.ammo.minimumTimeUntilReload 13---装填时间
ObjectTemplate.ammo.autoReload 1
ObjectTemplate.ammo.reloadWithoutPlayer 1
rem ---EndComp ---
rem ---BeginComp:WeaponBasedRecoilComp ---
ObjectTemplate.createComponent WeaponBasedRecoilComp
rem ---EndComp ---
rem ---BeginComp:SimpleDeviationComp ---
ObjectTemplate.createComponent SimpleDeviationComp
ObjectTemplate.deviation.minDev 6
rem ---EndComp ---
rem ---BeginCompefaultSoundComp ---
ObjectTemplate.createComponent DefaultSoundComp
rem ---EndComp ---
rem ---BeginCompefaultAnimationComp ---
ObjectTemplate.createComponent DefaultAnimationComp
rem ---EndComp ---
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
rem -------------------------------------
ObjectTemplate.addTemplate S_XXXXXXXX_SmokeLauncher_Fire1P
ObjectTemplate.addTemplate S_XXXXXXXX_SmokeLauncher_Fire1P_Outdoor
ObjectTemplate.addTemplate S_XXXXXXXX_SmokeLauncher_Fire3P
ObjectTemplate.addTemplate S_XXXXXXXX_SmokeLauncher_BoltClick
ObjectTemplate.addTemplate S_XXXXXXXX_SmokeLauncher_TriggerClick
ObjectTemplate.addTemplate S_XXXXXXXX_SmokeLauncher_SwitchFireRate
ObjectTemplate.addTemplate S_XXXXXXXX_SmokeLauncher_Reload1P
ObjectTemplate.addTemplate S_XXXXXXXX_SmokeLauncher_Reload3P
ObjectTemplate.addTemplate S_XXXXXXXX_SmokeLauncher_Deploy1P
ObjectTemplate.addTemplate S_XXXXXXXX_SmokeLauncher_Deploy3P
ObjectTemplate.addTemplate S_XXXXXXXX_SmokeLauncher_Zoom
ObjectTemplate.addTemplate XXXXXXXX_SmokeLauncher_Barrel
ObjectTemplate.setPosition 1.31001/0.633592/1.09128
ObjectTemplate.setRotation 40/-20/0
ObjectTemplate.addTemplate XXXXXXXX_SmokeLauncher_Barrel
ObjectTemplate.setPosition -1.27996/0.668583/1.18693
ObjectTemplate.setRotation -40/-20/0
ObjectTemplate.addTemplate XXXXXXXX_SmokeLauncher_Barrel
ObjectTemplate.setPosition -0.77857/0.50612/1.66129
ObjectTemplate.setRotation -45/-35/20
ObjectTemplate.addTemplate XXXXXXXX_SmokeLauncher_Barrel
ObjectTemplate.setPosition 0.95482/0.63234/1.42375
ObjectTemplate.setRotation -35/-50/0
rem -------------------------------------
ObjectTemplate.projectileTemplate Smokeflare
ObjectTemplate.keepProjectiles 5
ObjectTemplate.velocity 12
ObjectTemplate.itemIndex 2----这个是按键,你需要根据情况更改,不可与其他键位重复,否则闪退

ObjectTemplate.activeSafe Sound S_XXXXXXXX_SmokeLauncher_Fire1P
ObjectTemplate.lowSamples 2147483647
ObjectTemplate.mediumSamples 2147483647
ObjectTemplate.soundFilename "objects/weapons/armament/missiles/smokeflare/sounds/smoke_fire.wav"
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 0
ObjectTemplate.stopType 1
ObjectTemplate.volume 1
ObjectTemplate.pitch 1
ObjectTemplate.pan 0.5
ObjectTemplate.reverbLevel 0

ObjectTemplate.activeSafe Sound S_XXXXXXXX_SmokeLauncher_Fire1P_Outdoor

ObjectTemplate.activeSafe Sound S_XXXXXXXX_SmokeLauncher_Fire3P

ObjectTemplate.activeSafe Sound S_XXXXXXXX_SmokeLauncher_BoltClick

ObjectTemplate.activeSafe Sound S_XXXXXXXX_SmokeLauncher_TriggerClick
ObjectTemplate.lowSamples 2147483647
ObjectTemplate.mediumSamples 2147483647
ObjectTemplate.soundFilename "objects/weapons/armament/decoy_flare_launcher/sounds/out_of_flares.wav"
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 0
ObjectTemplate.stopType 1
ObjectTemplate.volume 0.7
ObjectTemplate.pitch 1
ObjectTemplate.pan 0.5
ObjectTemplate.reverbLevel 0

ObjectTemplate.activeSafe Sound S_XXXXXXXX_SmokeLauncher_SwitchFireRate

ObjectTemplate.activeSafe Sound S_XXXXXXXX_SmokeLauncher_Reload1P
ObjectTemplate.lowSamples 2147483647
ObjectTemplate.mediumSamples 2147483647
ObjectTemplate.soundFilename "objects/weapons/armament/missiles/smokeflare/sounds/smoke_reload.wav"
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 0
ObjectTemplate.stopType 1
ObjectTemplate.volume 1
ObjectTemplate.pitch 1
ObjectTemplate.pan 0.5
ObjectTemplate.reverbLevel 0

ObjectTemplate.activeSafe Sound S_XXXXXXXX_SmokeLauncher_Reload3P

ObjectTemplate.activeSafe Sound S_XXXXXXXX_SmokeLauncher_Deploy1P

ObjectTemplate.activeSafe Sound S_XXXXXXXX_SmokeLauncher_Deploy3P

ObjectTemplate.activeSafe Sound S_XXXXXXXX_SmokeLauncher_Zoom

ObjectTemplate.create Bundle XXXXXXXX_SmokeLauncher_Barrel
ObjectTemplate.createdInEditor 1
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 0


回复

使用道具 举报

6

主题

28

回帖

163

积分

下士

 楼主| 发表于 2024-7-30 21:45:38 | 显示全部楼层
感谢!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即加入

本版积分规则

Archiver|小黑屋|bfmil ( 拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,会员帖子系会员发表,并不代表本站立场! )

GMT+8, 2024-11-21 16:38 , Processed in 0.104965 second(s), 22 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表