HX3 Foren

HX3 Foren (https://hx3.de/)
-   Editing & Scripting (https://hx3.de/editing-scripting-167/)
-   -   Improved Bullet Cam Script (https://hx3.de/editing-scripting-167/improved-bullet-cam-script-19554/)

miromanu 20.08.2010 05:23

Improved Bullet Cam Script
 
Hallo,
wie der Titel schon verrät geht es um den Improved Bullet Cam Script. Ich wollte fragen ob jemand, der ahnung vom scripten hat, weiss ob man es so verändern kann das nicht jede kugel die abgeschossen wird verfolgt wird sondern nur die die einen Headshot verursacht.
Und ein problem ist das seitdem ich Combined Operations habe das script nicht mit der m107 funktioniert. Hier ist nochmal das script:

Code:

// Bullet Cam Script
// v1.1
// cam.sqf
// Big Dawg KS
// 7/13/09
//
// Call via Fired EH, ex:
//  this addEventHandler ["fired",{_this execVM "cam.sqf"}]
//
// To exit the camera ingame (while in flight), press the key for ironsights/optics
//
// To add supported weapons, add MUZZLE classnames to _list (note: classnames are CASE SENSITIVE)
//
// To disable bullet cam, set BDKS_DisableBulletCam = true
//
// To disable blur effects, set BDKS_BulletCamNoBlur = true
//
// To disable particle effects, set BDKS_BulletCamNoParticleFX = true
//
// To change FOV (zoom), change the value of BDKS_BulletCamFOV (default 0.05). Ex:
//  BDKS_BulletCamFOV = 0.3
//
// To change time acceleration, change the value of BDKS_BulletCamAccTime (default 0.5). Ex:
//  BDKS_BulletCamAccTime = 0.2
// (Note: AccTime only works in Singleplayer)
//
// To make another unit's (other than local player) bullet cam show for the
// local player, set unit variable BDKS_ShowBulletCamToPlayer = true, ex:
//  if(local Spotter)then{Sniper setVariable ["BDKS_ShowBulletCamToPlayer",true]}
//------------------------------------------------------------------------------------------------
 
_projectile = nearestObject [_this select 0,_this select 4];
 
if(call {if(isNil "BDKS_DisableBulletCam")then{true}else{!BDKS_DisableBulletCam}})then{
 
if((_this select 0) == vehicle player || call {if(isNil {(_this select 0) getVariable "BDKS_ShowBulletCamToPlayer"})then{false}else{(_this select 0) getVariable "BDKS_ShowBulletCamToPlayer"}})then{
 
// Add more weapons here
_list = ["M40A3","m107","M24","M4SPR","SVD","SVD_CAMO","ksvk","DMR","huntingrifle","SMAW","Javelin","SidewinderLaucher_F35","BombLauncherF35"];
 
_type = getText (configFile >> "CfgAmmo" >> (_this select 4) >> "simulation");
_relPos = [0,-13,0.05];
_fov = 0.05;
if(!isNil "BDKS_BulletCamFOV")then{_fov = BDKS_BulletCamFOV};
if(_type == "shotMissile" || _type == "shotRocket")then{_relPos = [0,-13,2.2]; _fov = 0.5};
 
_disablePP = false;
if(call {if(isNil "BDKS_BulletCamNoBlur")then{false}else{BDKS_DisableBulletCam}})then{_disablePP = true};
 
_accTime = 0.5;
if(!isNil "BDKS_BulletCamAccTime")then{_accTime = BDKS_BulletCamAccTime};
 
_enableParticles = true;
if(call {if(isNil "BDKS_BulletCamNoParticleFX")then{false}else{BDKS_BulletCamNoParticleFX}})then{_enableParticles = false};
 
if((_this select 2) in _list && !(isNull _projectile))then{
    setAccTime _accTime;
    _camera = "camera" camCreate (getPos _projectile);
    _camera cameraEffect ["INTERNAL","BACK"];
    showCinemaBorder false;
    cutText ["","BLACK IN",0.2];
    _cancel = false;
 
    if(_enableParticles && _type == "ShotBullet")then{
        _pShape = ["\ca\Data\ParticleEffects\Universal\Universal.p3d", 16, 13, 3, 0];
        _pSize = [0.01,0.05];
        _pColor = [[1,1,1,0.08],[1,1,1,0.16],[1,1,1,0.03],[1,1,1,0]];
 
        _pSource = "#particlesource" createVehicleLocal (getPos _projectile);
        _pSource attachTo [_projectile,[0,0,0]];
        _pSource setParticleParams [_pShape,"","Billboard",1,0.3,[0,0,0],[0,0,0],0,1,0.79,0.18,_pSize,_pColor,[1000],100,0.01,"","",_projectile,360];
        _pSource setDropInterval 0.001;
    };
 
    while{alive _projectile && alive _camera && !_cancel}do{
        _camera camSetTarget _projectile;
        _camera camSetRelPos _relPos;
        _camera camSetFOV _fov;
        _camera camSetFocus [600,2];
        _camera camCommit 0;
 
        "RadialBlur" ppEffectAdjust [0.02,0.02,0.1,0.1];
        "RadialBlur" ppEffectCommit 0.01;
        if(!_disablePP)then{"RadialBlur" ppEffectEnable true};
 
        if(inputAction "optics" != 0)then{_cancel = true};
 
        sleep 0.001;
    };
    if(alive _camera && !_cancel)then{
        _camera camSetFocus [-(_relPos select 1),1];
        _camera camSetFOV (_fov * 1.6);
        _camera camCommit 1.5;
 
        "RadialBlur" ppEffectAdjust [0,0,1,1];
        "RadialBlur" ppEffectCommit 0.7;
 
        sleep 1.39;
    };
    cutText ["","BLACK OUT",0.1];
    sleep 0.11;
    setAccTime 1;
    "RadialBlur" ppEffectEnable false;
    _camera cameraEffect ["TERMINATE","BACK"];
    camDestroy _camera;
    if(_enableParticles)then{deleteVehicle _pSource};
    cutText ["","BLACK IN",0.6];
};
 
};
 
};


LurchiDerLurch 20.08.2010 10:14

spontan würd ich sagen dass das nicht so einfach geht

die kugel fliegt ja und wird dann von der erdanziehung und dem wind beeinflusst.

da dann vorher sicher zu sein, dass der schuss in kopf geht ist nicht so einfach...

Lester 20.08.2010 12:23

Das Problem dabei dürfte sein das die Engine beim Abschuß noch nicht weiss ob und was für ein Treffer es wird. ;)

miromanu 21.08.2010 02:01

hmm das stimmt wohl schade aber naja man kann nicht alles haben :)


Alle Zeitangaben in WEZ +1. Es ist jetzt 14:57 Uhr.

Angetrieben durch vBulletin, Entwicklung von Philipp Dörner & Tobias


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117