anguis 4 Posted March 29, 2011 (edited) Hi, folks, Which spectate script includes the 1st-person and missile-cam views? I haven't been able to find it. Thanks! Edit: I'm using Kegetys' 1.2 and I don't see those views in it. Edit 2: The only reason I'm looking for this version is 1st-person is the only way I know to have night-vision while spectating. If anyone knows how to enable NV for the other views, I'd be more interested in that. Edited March 29, 2011 by Anguis Share this post Link to post Share on other sites
faguss 65 Posted March 29, 2011 In FDF mod there's most up-to-date version. Share this post Link to post Share on other sites
anguis 4 Posted March 30, 2011 (edited) Thanks, man! I've found the nextcam and onplayerrespawnasseagull scripts in the dta folder, but I haven't found the description.ext text. Is it not needed in this version? (I'd use yours, but I need the seagull - for photos.) Edited March 30, 2011 by Anguis Share this post Link to post Share on other sites
nikiller 18 Posted March 30, 2011 (edited) hi Anguis, Here's the most uptodate spectate we are using on [LOL]. There is all the view you want here. description.ext //######################################################################################## // SPECTATOR SCRIPT 1.4 //######################################################################################## // Control types #define CT_STATIC 0 #define CT_BUTTON 1 #define CT_EDIT 2 #define CT_SLIDER 3 #define CT_COMBO 4 #define CT_LISTBOX 5 #define CT_TOOLBOX 6 #define CT_CHECKBOXES 7 #define CT_PROGRESS 8 #define CT_HTML 9 #define CT_STATIC_SKEW 10 #define CT_ACTIVETEXT 11 #define CT_TREE 12 #define CT_3DSTATIC 20 #define CT_3DACTIVETEXT 21 #define CT_3DLISTBOX 22 #define CT_3DHTML 23 #define CT_3DSLIDER 24 #define CT_3DEDIT 25 #define CT_OBJECT 80 #define CT_OBJECT_ZOOM 81 #define CT_OBJECT_CONTAINER 82 #define CT_OBJECT_CONT_ANIM 83 #define CT_USER 99 // Static styles #define ST_HPOS 0x0F #define ST_LEFT 0 #define ST_RIGHT 1 #define ST_CENTER 2 #define ST_UP 3 #define ST_DOWN 4 #define ST_VCENTER 5 #define ST_TYPE 0xF0 #define ST_SINGLE 0 #define ST_MULTI 16 #define ST_TITLE_BAR 32 #define ST_PICTURE 48 #define ST_FRAME 64 #define ST_BACKGROUND 80 #define ST_GROUP_BOX 96 #define ST_GROUP_BOX2 112 #define ST_HUD_BACKGROUND 128 #define ST_TILE_PICTURE 144 #define ST_WITH_RECT 160 #define ST_LINE 176 #define ST_SHADOW 256 #define ST_NO_RECT 512 #define ST_TITLE ST_TITLE_BAR + ST_CENTER // Predefined controls #define IDC_OK 1 #define IDC_CANCEL 2 // Colors #define TextColor 0.08, 0.08, 0.12 #define InvTextColor 0.35, 0.38, 0.36 // Fonts #define FontS "tahomaB24" #define FontM "tahomaB36" #define FontHTML "courierNewB64" #define FontHTMLBold "courierNewB64" #define FontMAP "courierNewB64" #define FontMAIN "SteelfishB64" #define FontMAINCZ "SteelfishB64CE" #define FontTITLE "SteelfishB128" #define FontTITLEHalf "SteelfishB64" #define FontBOOK "garamond64" #define FontNOTES "AudreysHandI48" class RscSliderV { type = CT_SLIDER; style = SL_VERT; color[] = {0, 1, 0, 1}; angle = 0; }; class RscText { type = CT_STATIC; idc = -1; style = ST_LEFT; h = 0.04; colorBackground[] = {0, 0, 0, 0}; colorText[] = {TextColor, 0.75}; font = FontS; sizeEx = 0.02; }; class RscActiveText { type = CT_ACTIVETEXT; style = ST_LEFT; color[] = {0, 0, 0, 1}; colorActive[] = {1, 1, 1, 1}; font = FontMAIN; sizeEx = 0.05; soundEnter[] = {"ui\ui_over", 0.2, 1}; soundPush[] = {, 0.2, 1}; soundClick[] = {"ui\ui_ok", 0.2, 1}; soundEscape[] = {"ui\ui_cc", 0.2, 1}; default = false; }; class RscActiveMenu : RscActiveText { color[] = {1, 1, 1, 1}; colorActive[] = {1, 0, 0, 1}; font = FontTITLEHalf; sizeEx = 0.05; default = false; }; class RscObject { type = CT_OBJECT; scale = 1.0; direction[] = {0, 0, 1}; up[] = {0, 1, 0}; }; class RscObjListBox { type = CT_LISTBOX; font = FontTITLEHalf; style = 4; selection = "display"; angle = 0; size = 0.8; // 3D size color[] = {0, 0, 0, 0}; colorSelect[] = {0, 1, 0, 1}; colorSelectBackground[] = {0, 1, 0, 0.2}; colorText[] = {0, 1, 0, 0.5}; }; class RscHTML{}; // FDF mod spectator // Include from rscSpectate.hpp // // Spectating script v1.4 for FDF mod by Kegetys // class RscFDFDlgSpectateDeath1st { idd = 821151552; movingEnable = true; controlsBackground[]= { Background1 }; class Background1 : RscText { idc = 1047001; style = ST_HUD_BACKGROUND; x = 0.375; y = 0.02; w = 0.25; h = 0.04; text = ; colorBackground[] = {0, 0, 0, 0.8}; }; controls[]= { TitleS, Title, ButtonNEXT, ButtonPREV, PlrName }; class Title : RscText { idc = -1; style = ST_CENTER; x = 0.375; y = 0.02; w = 0.25; h = 0.04; font = FontTITLEHalf; //colorText[] = {1, 0, 0, 1}; colorText[] = {0/255, 108/255, 169/255, 1.0}; sizeEx = 0.038; text = "SPECTATING"; }; class TitleS : RscText { idc = -1; style = ST_CENTER; x = 0.375+0.002; y = 0.02+0.002; w = 0.25; h = 0.04; font = FontTITLEHalf; colorText[] = {0, 0, 0, 0.8}; sizeEx = 0.038; text = "SPECTATING"; }; class ButtonNEXT : RscActiveMenu { idc = -1; style = ST_CENTER; x = 0.575; y = 0.021; w = 0.02; h = 0.031; text = ">"; default = 0; soundClick[] = {"ui\ui_ok", 0.2, 1}; action = "1 exec ""nextCam.sqs"""; }; class ButtonPREV : RscActiveMenu { idc = -1; style = ST_CENTER; x = 0.4; y = 0.021; w = 0.02; h = 0.036; text = "<"; default = 0; soundClick[] = {"ui\ui_ok", 0.2, 1}; action = "-1 exec ""nextCam.sqs"""; }; class PlrName : RscText { idc = 116969; style = ST_CENTER; x = 0.375; y = 0.060; w = 0.25; h = 0.02; font = FontM; colorText[] = {0, 0, 0, 0.6}; color[] = {0, 0, 0, 0.6}; colorActive[] = {0, 0, 0, 0.6}; /* colorText[] = {1, 0, 0, 1}; color[] = {1, 0, 0, 1}; colorActive[] = {1, 0.2, 0.2, 1}; */ //sizeEx = 0.05; text = "Unknown"; }; }; class RscFDFDlgSpectateDeath { idd = 821151551; movingEnable = true; controlsBackground[]= { Background4, Background5, BackgroundMenu, BackgroundList }; class Background4 : RscText { x = 0.0; y = 0.0; w = 1; h = 0.065; text = ; colorBackground[] = {0, 0, 0, 1}; }; class Background5 : RscText { x = 0.0; y = 0.935; w = 1; h = 0.065; text = ; colorBackground[] = {0, 0, 0, 1}; }; class BackgroundMenu : RscText { idc = 1046006; style = ST_HUD_BACKGROUND; x = 0.02; y = 0.055; w = 0.120; h = 0.255; text = ; colorBackground[] = {0, 0, 0, 0.8}; }; class BackgroundList : RscText { idc = 1047001; style = ST_HUD_BACKGROUND; x = 0.84; y = 0.055; w = 0.14; h = 0.26; text = ; colorBackground[] = {0, 0, 0, 0.8}; }; controls[]= { Title, ButtonPREV, ButtonNEXT, Spectation, PlrName, menu, menu2, MenuPlrs, MenuPlrs2, MenuItem1, MenuItem2, MenuItem3, MenuItem4, MenuItem5, MenuItem6, MenuItem7, MenuItem8, MenuSlider, MenuLine, MenuLine2, MenuSliderLTR1, MenuSliderLTR2, MenuSliderLTR3, MenuSliderLTR4, MenuSliderLTR5, MenuSliderLTR6, MenuSliderLTR7, MenuSliderLTR8, ListBox }; class ListBox : RscObjListBox { idc = 1047002; x = 0.85; y = 0.075; w = 0.12; h = 0.22; rows = 5; rowHeight = 0.01; size = 0.56; // 3D size colorText[] = {1, 1, 1, 0.6}; colorSelect[] = {0.3, 0.5, 1, 1}; colorSelectBackground[] = {0, 1, 0, 0.2}; }; class Title : RscText { idc = -1; style = ST_CENTER; x = 0.2; y = -0.015; w = 0.6; h = 0.1; font = FontTITLEHalf; colorText[] = {1, 0, 0, 1}; sizeEx = 0.048; text = "YOU ARE DEAD"; }; class ButtonNEXT : RscActiveMenu { idc = -1; x = 0.90; y = 0.94; w = 0.15; h = 0.05; text = "Next >>"; default = 0; soundClick[] = {"ui\ui_ok", 0.2, 1}; action = "1 exec ""nextCam.sqs"""; }; class ButtonPREV : RscActiveMenu { idc = -1; x = 0.55; y = 0.94; w = 0.15; h = 0.05; text = "<< Previous"; default = 0; soundClick[] = {"ui\ui_ok", 0.2, 1}; action = "-1 exec ""nextCam.sqs"""; }; class Spectation : RscText { idc = -1; style = ST_CENTER; x = 0.70; y = 0.94; w = 0.15; h = 0.05; font = FontTITLEHalf; colorText[] = {0/255, 108/255, 169/255, 1.0}; // FDF sizeEx = 0.05; text = "- Spectating -"; }; class PlrName : RscText { idc = 116969; style = ST_CENTER; x = 0.10; y = 0.94; w = 0.15; h = 0.05; font = FontTITLEHalf; colorText[] = {0/255, 108/255, 169/255, 1.0}; // FDF color[] = {0/255, 108/255, 169/255, 1.0}; // FDF colorActive[] = {0/255, 108/255, 169/255, 1.0}; // FDF /* colorText[] = {1, 0, 0, 1}; color[] = {1, 0, 0, 1}; colorActive[] = {1, 0.2, 0.2, 1}; */ sizeEx = 0.05; text = "Unknown"; }; class Menu : RscActiveMenu { idc = 1046007; x = 0.03; y = 0.02; w = 0.15; h = 0.025; text = "view menu"; default = 0; angle = 90; colorActive[] = {0.4, 0.8, 1, 1}; soundClick[] = {"ui\ui_ok", 0.2, 1}; action = "ctrlShow [1046001,false];ctrlShow [1046002,false];ctrlShow [1046003,false];ctrlShow [1046004,false];ctrlShow [1046005,false];ctrlShow [1046006,false];ctrlShow [1046007,false];ctrlShow [1046008,true];ctrlShow [1046009,false];ctrlShow [1046010,false];ctrlShow [1046011,false];ctrlShow [1046012,false];ctrlShow [1046013,false];ctrlShow [1046014,false];ctrlShow [1046015,false];ctrlShow [1046016,false];ctrlShow [1046017,false];ctrlShow [1046018,false];ctrlShow [1046019,false];ctrlShow [1046020,false];ctrlShow [1046021,false];ctrlShow [1046022,false];ctrlShow [1046023,false]"; sizeEx = 0.028; }; class Menu2 : Menu { idc = 1046008; color[] = {1.0, 1.0, 1.0, 0.4}; colorActive[] = {0.3, 0.5, 1, 1}; action = "ctrlShow [1046001,true];ctrlShow [1046002,true];ctrlShow [1046003,true];ctrlShow [1046004,true];ctrlShow [1046005,true];ctrlShow [1046006,true];ctrlShow [1046007,true];ctrlShow [1046008,false];ctrlShow [1046009,true];ctrlShow [1046010,true];ctrlShow [1046011,true];ctrlShow [1046012,true];ctrlShow [1046013,true];ctrlShow [1046014,true];ctrlShow [1046015,true];ctrlShow [1046016,true];ctrlShow [1046017,true];ctrlShow [1046018,true];ctrlShow [1046019,true];ctrlShow [1046020,true];ctrlShow [1046021,true];ctrlShow [1046022,true];ctrlShow [1046023,true]"; }; class MenuPlrs : RscActiveMenu { idc = 1048001; x = 0.92; y = 0.02; w = 0.15; h = 0.025; text = "namelist"; default = 0; angle = 90; colorActive[] = {0.4, 0.8, 1, 1}; soundClick[] = {"ui\ui_ok", 0.2, 1}; action = "ctrlShow [1047002,false];ctrlShow [1047001,false];ctrlShow [1048001,false];ctrlShow [1048002,true];"; sizeEx = 0.028; }; class MenuPlrs2 : MenuPlrs { idc = 1048002; color[] = {1.0, 1.0, 1.0, 0.4}; colorActive[] = {0.3, 0.5, 1, 1}; action = "ctrlShow [1047002,true];ctrlShow [1047001,true];ctrlShow [1048001,true];ctrlShow [1048002,false];"; }; class MenuItem1 : RscActiveMenu { idc = 1046001; x = 0.03; y = 0.073; w = 0.08; h = 0.025; text = "close view"; default = 0; angle = 90; colorText[] = {1, 1, 1, 0.6}; colorActive[] = {0.3, 0.5, 1, 1}; soundClick[] = {"ui\ui_ok", 0.2, 1}; action = "DeathCam camSetFOV 0.976;DeathCam camSetTarget vehicle DeathCamCurCamTarget;DeathCamComSpeed = 0.4;DeathCamRelPos = [0,-2,0.3];DeathCamTarHeight = 1.7;DeathCamCineViewSpecial = 0;DeathCamExit = false"; sizeEx = 0.028; }; class MenuItem2 : MenuItem1 { idc = 1046002; y = 0.073 + (1*0.028); text = "far view"; action = "DeathCam camSetFOV 0.976;DeathCam camSetTarget vehicle DeathCamCurCamTarget;DeathCamComSpeed = 1.9;DeathCamRelPos = [0,-8,2.5];DeathCamTarHeight = 1.5;DeathCamCineViewSpecial = 0;"; }; class MenuItem3 : MenuItem1 { idc = 1046003; y = 0.073 + (2*0.028); text = "front view"; action = "DeathCam camSetFOV 0.976;DeathCam camSetTarget vehicle DeathCamCurCamTarget;DeathCamComSpeed = 0.1;DeathCamRelPos = [0,4.0,0.02];DeathCamTarHeight = 1.7;DeathCamCineViewSpecial = 0;"; }; class MenuItem4 : MenuItem1 { idc = 1046004; y = 0.073 + (3*0.028); text = "top view"; action = "DeathCam camSetFOV 0.976;DeathCam camSetTarget [0,0,-99999999.99];DeathCamComSpeed = 0.05;DeathCamRelPos = [0,0.1,50.0];DeathCamTarHeight = 1.7;DeathCamCineViewSpecial = 2;"; }; class MenuItem5 : MenuItem1 { idc = 1046005; y = 0.073 + (4*0.028); text = "cinematic view"; action = "DeathCam camSetFOV 0.976;DeathCam camSetTarget vehicle DeathCamCurCamTarget;DeathCamRelPos = [3,70.1,10.0];DeathCam camSetRelPos DeathCamRelPos;DeathCamComSpeed = 0;DeathCamCineViewSpecial = 1;"; }; class MenuItem6 : MenuItem1 { idc = 1046020; y = 0.073 + (5*0.028); text = "1st person view"; action = "DeathCamCineViewSpecial = 3;"; }; class MenuItem7 : MenuItem1 { idc = 1046021; y = 0.073 + (6*0.028); text = "gunner view"; action = "DeathCamCineViewSpecial = 4;"; }; class MenuItem8 : MenuItem1 { idc = 1046023; y = 0.073 + (7.1*0.028); w = 0.1; text = "missile cam: enabled"; action = "DeathCamMissileCamEnabled = !DeathCamMissileCamEnabled;if(DeathCamMissileCamEnabled) then {ctrlSetText[1046023,""missile cam: enabled""]} else {ctrlSetText[1046023,""missile cam: disabled""]}"; }; class MenuLine : RscText { idc = 1046011; style = ST_LINE; x = 0.113; y = 0.0; w = 0; h = 0.270; text = ; colorBackground[] = {1, 1, 1, 1}; color[] = {1, 1, 1, 1}; colorText[] = {0, 0, 0, 1}; }; class MenuLine2 : RscText { idc = 1046022; style = ST_LINE; x = 0.02; y = 0.270; w = 0.120; h = 0; text = ; colorBackground[] = {1, 1, 1, 1}; color[] = {1, 1, 1, 1}; colorText[] = {0, 0, 0, 1}; }; class MenuSlider : RscSliderV { idc = 1046010; x = 0.12; y = 0.08; w = 0.015; h = 0.15; color[] = {1, 1, 1, 0.8}; }; class MenuSliderLTR1 : RscText { idc = 1046012; x = 0.1145; y = 0.1045; w = 0.015; h = 0.01; text = "D"; color[] = {1, 1, 1, 1}; colorText[] = {1, 1, 1, 0.2}; sizeEx = 0.018; }; class MenuSliderLTR2 : MenuSliderLTR1 { idc = 1046013; x = 0.1150; y = 0.1175; text = "I"; }; class MenuSliderLTR3 : MenuSliderLTR1 { idc = 1046014; y = 0.1305; text = "S"; }; class MenuSliderLTR4 : MenuSliderLTR1 { idc = 1046015; y = 0.1435; text = "T"; }; class MenuSliderLTR5 : MenuSliderLTR1 { idc = 1046016; y = 0.1565; text = "A"; }; class MenuSliderLTR6 : MenuSliderLTR1 { idc = 1046017; y = 0.1695; text = "N"; }; class MenuSliderLTR7 : MenuSliderLTR1 { idc = 1046018; y = 0.1830; text = "C"; }; class MenuSliderLTR8 : MenuSliderLTR1 { idc = 1046019; y = 0.1960; text = "E"; }; }; onPlayerRespawnAsSeagull.sqs ; Spectating script v1.4 by Kegetys <Kegetys@dnainternet.net> ; [url]http://www.ofp.kege.cjb.net[/url] ; ; Requires OFP Version 1.85 or up ; ; ;put the name of the units you want to be spectated here ? ("alive _x" count [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12]) == 0 : exit ;put the name of the units you want to be spectated here too DeathCamArray = [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12] DeathCamArrayTemp = [] "if ((not isNull _x) and (alive _x)) then {DeathCamArrayTemp = DeathCamArrayTemp + [_x]}" foreach DeathCamArray DeathCamArray = DeathCamArrayTemp DeathCamNameCache = [] "if (name _x == ""error: no unit"") then {DeathCamNameCache = DeathCamNameCache + [""object""]} else {DeathCamNameCache = DeathCamNameCache + [name _x]}" foreach DeathCamArray DeathCamEventHandledVehicles = [] {DeathCamEventHandledVehicles = DeathCamEventHandledVehicles + [_x];_x addEventHandler["fired",{if ((_this select 0) == (vehicle DeathCamCurTarget)) then {_this exec "missileCam.sqs"}}]} forEach DeathCamArray _seagull = _this select 2 _seagull setpos[0,0,0] DeathCamCurCamTarget = "HeliHEmpty" CreateVehicle getpos player _HeightDummy = "HeliHEmpty" CreateVehicle getpos player ~2.5 titleCut ["","BLACK OUT", 1.5] ~2 titleCut ["","BLACK IN", 4] ? count DeathCamArray == 0 : _vhltemp = player ? count DeathCamArray == 0 : goto "seagull" DeathCamMissileCamEnabled = true DeathCamCineViewSpecial = 0 DeathCamComSpeed = 0.4 DeathCamRelPos = [0,-2,0.3] DeathCamTarHeight = 1.7 DeathCamIndex = 0 DeathCamCurTarget = player DeathCam = "camera" camCreate [(getpos player select 0)+2, (getpos player select 1)+2, 700 ] DeathCam cameraEffect ["internal","front"] DeathCam camSetTarget vehicle DeathCamCurCamTarget DeathCam camSetPos [(getpos player select 0)+2, (getpos player select 1)+2, 1000 ] DeathCam camSetFOV 0.976 DeathCam camCommand "inertia on" DeathCam camCommit 0 showCinemaBorder false #start _ok = createDialog "RscFDFDlgSpectateDeath" ctrlShow [1046001,false];ctrlShow [1046002,false];ctrlShow [1046003,false];ctrlShow [1046004,false];ctrlShow [1046005,false];ctrlShow [1046006,false];ctrlShow [1046007,false];ctrlShow [1046008,true];ctrlShow [1046009,false];ctrlShow [1046010,false];ctrlShow [1046011,false];ctrlShow [1046012,false];ctrlShow [1046013,false];ctrlShow [1046014,false];ctrlShow [1046015,false];ctrlShow [1046016,false];ctrlShow [1046017,false];ctrlShow [1046018,false];ctrlShow [1046019,false];ctrlShow [1046020,false];ctrlShow [1046021,false];ctrlShow [1046022,false];ctrlShow [1046023,false] ctrlSetText [116969,name player] ctrlShow [1047002,false];ctrlShow [1047001,false];ctrlShow [1048001,false] sliderSetRange [1046010, 0.2, 7] sliderSetPosition [1046010, 1] kegfoo = 0 "_i = lbAdd [1047002, DeathCamNameCache select kegfoo];lbSetData [1047002, _i, format[""%1"",kegfoo]];if (side _x == west) then {lbSetColor[1047002, _i, [0.8,0.8,1,0.8]]};if (side _x == EAST) then {lbSetColor[1047002, _i, [1,0.8,0.8,0.8]]};if (side _x == resistance) then {lbSetColor[1047002, _i, [0.8,1,0.8,0.8]]};if ((name _x == ""error: no unit"") and ((DeathCamNameCache select kegfoo) == ""object"")) then {lbSetColor[1047002, _i, [0,0,0,0.4]]};kegfoo = kegfoo + 1" foreach DeathCamArray lbSetCurSel [1047002, 0] kegfoo = 0 "if (player == _x) then {lbSetCurSel [1047002, kegfoo] };kegfoo = kegfoo + 1;" foreach DeathCamArray ? not _ok : exit #loop kegfoo = 0 "if (not alive _x) then {lbSetColor[1047002, kegfoo, [0,0,0,0.4]]};kegfoo = kegfoo + 1" foreach DeathCamArray ? lbData[1047002,(lbCurSel 1047002)] != format["%1",DeathCamIndex] : _TargetChange = 1 ? _TargetChange == 1 : DeathCamIndex = lbCurSel 1047002 ? (_TargetChange == 1) and (dialog): 0 exec "nextCam.sqs" _TargetChange = 0 _seagull setpos[0,0,(getpos _vhlTemp select 2)+15] ? !dialog : goto "seagull" DeathCam camCommit DeathCamComSpeed _vhlTemp = vehicle DeathCamCurTarget if !(_vhlTemp in DeathCamEventHandledVehicles) then {DeathCamEventHandledVehicles = DeathCamEventHandledVehicles + [_vhlTemp];_vhlTemp addEventHandler["fired",{if ((_this select 0) == (vehicle DeathCamCurTarget)) then {_this exec "missileCam.sqs"}}]} ; Cinematic view? ? DeathCamCineViewSpecial == 1 : goto "camspecial" ; 1st Person view? ? DeathCamCineViewSpecial == 3 : goto "camspecial1st" ; Gunner view? ? DeathCamCineViewSpecial == 4 : goto "camspecialgunnerview" ; The following will reduce the effect of warping spectated object to the camera itself _Divider = 100 - (speed _vhlTemp * 2) ? _Divider < 10 : _Divider = 10 _moX = (getpos DeathCamCurCamTarget select 0) + (((getpos _vhlTemp select 0) - (getpos DeathCamCurCamTarget select 0))/_Divider) _moY = (getpos DeathCamCurCamTarget select 1) + (((getpos _vhlTemp select 1) - (getpos DeathCamCurCamTarget select 1))/_Divider) _moZ = ((getpos DeathCamCurCamTarget select 2)-DeathCamTarHeight) + (((getpos _vhlTemp select 2) - ((getpos DeathCamCurCamTarget select 2)-DeathCamTarHeight))/_Divider) ; Workaround for an ofp "feature" with the setpos/getpos commands and roadway lods _HeightDummy setpos [getpos _vhlTemp select 0,getpos _vhlTemp select 1,0] _h2 = _vhlTemp distance _HeightDummy _h1 = _h2 + DeathCamTarHeight ? vehicle DeathCamCurTarget == DeathCamCurTarget : _moZ = ((_h1)-DeathCamTarHeight) + (((_h2) - ((_h1)-DeathCamTarHeight))/_Divider) DeathCamCurCamTarget setpos[_moX,_moY,_moZ + DeathCamTarHeight] DeathCamCurCamTarget setdir getdir _vhlTemp ; Top view? ? DeathCamCineViewSpecial == 2 : goto "camspecialTop" _RealRelPos = [(DeathCamRelPos select 0) * (sliderPosition 1046010), (DeathCamRelPos select 1) * (sliderPosition 1046010), (DeathCamRelPos select 2) * ((sliderPosition 1046010)*2)] ? ((speed vehicle DeathCamCurTarget >= 150)) : _RealRelPos = [(DeathCamRelPos select 0) * (sliderPosition 1046010) * 5, (DeathCamRelPos select 1) * (sliderPosition 1046010) * 5, (DeathCamRelPos select 2) * ((sliderPosition 1046010)*2) * 5] DeathCam camSetRelPos _RealRelPos goto "loop" ; Cinematic view #camspecial DeathCamCurCamTarget setpos[getpos _vhlTemp select 0,getpos _vhlTemp select 1,(getpos _vhlTemp select 2) + DeathCamTarHeight] DeathCamCurCamTarget setdir getdir _vhlTemp ; Reset cam if object is far away... if its a very fast object use a more distant view ? ((speed vehicle DeathCamCurTarget >= 150)) and (((DeathCam) distance (DeathCamCurCamTarget)) > 400) : DeathCam camSetRelPos [3,400.1,10.0] ? ((speed vehicle DeathCamCurTarget < 150)) and (((DeathCam) distance (DeathCamCurCamTarget)) > 100) : DeathCam camSetRelPos DeathCamRelPos ; Distance slider sets zoom (FOV) in cinematic view DeathCam camSetFOV 0.976 * ((sliderPosition 1046010)/5) goto "loop" ; Top view #camspecialTop DeathCamCurCamTarget setdir 0 DeathCam camSetPos [getpos DeathCamCurCamTarget select 0,getpos DeathCamCurCamTarget select 1,(getpos DeathCamCurCamTarget select 2)+(30 * sliderPosition 1046010 * 1.5)] goto "loop" ; User pressed esc, return seagull control #seagull titleCut ["","BLACK IN", 0] _seagull setpos [0,0,0] _h = sqrt(((_vhlTemp distance _seagull) * (_vhlTemp distance _seagull)) - (sqrt(((getpos _vhlTemp select 0) * (getpos _vhlTemp select 0)) + ((getpos _vhlTemp select 1) * (getpos _vhlTemp select 1))) * sqrt(((getpos _vhlTemp select 0) * (getpos _vhlTemp select 0)) + ((getpos _vhlTemp select 1) * (getpos _vhlTemp select 1))))) + ((getpos _vhlTemp select 2)+15) ? _h > 80 : _h = 80 _seagull setpos [(getpos _vhlTemp select 0)-15+random 30, (getpos _vhlTemp select 1)-15+random 30,_h] _seagull setvelocity[0,0,0] _seagull switchCamera "INTERNAL" _seagull cameraEffect ["terminate","FRONT"] _seagull camCommand "manual on" ; Return back to spectating @((getpos _seagull select 2) > 150) && (count DeathCamArray != 0) titleCut ["","BLACK OUT", 0.5] ~0.5 titleCut ["","BLACK IN", 2] DeathCam cameraEffect ["internal","front"] goto "start" #camspecial1st closedialog 821151551 titleCut ["","BLACK IN", 1] ~0.1 _ok = createDialog "RscFDFDlgSpectateDeath1st" hint " Press ESC to return " _name = name (DeathCamArray select DeathCamIndex) if (_name == "error: no unit") then {_name = ""} ctrlSetText [116969,_name] #camspecial1stloop ~0.001 (vehicle DeathCamCurTarget) switchCamera "INTERNAL" (vehicle DeathCamCurTarget) cameraEffect ["terminate","FRONT"] ? (DeathCamCineViewSpecial == 3) && (dialog) : goto "camspecial1stloop" DeathCamCineViewSpecial = 0 titleCut ["","BLACK IN", 1] closedialog 821151552 ~0.1 DeathCam cameraEffect ["internal","front"] goto "start" #camspecialgunnerview closedialog 821151551 titleCut ["","BLACK IN", 1] ~0.1 _ok = createDialog "RscFDFDlgSpectateDeath1st" hint " Press ESC to return " _name = name (DeathCamArray select DeathCamIndex) if (_name == "error: no unit") then {_name = ""} ctrlSetText [116969,_name] #camspecialgunnerviewloop ~0.001 (vehicle DeathCamCurTarget) switchCamera "GUNNER" (vehicle DeathCamCurTarget) cameraEffect ["terminate","BACK"] ? (DeathCamCineViewSpecial == 4) && (dialog) : goto "camspecialgunnerviewloop" DeathCamCineViewSpecial = 0 titleCut ["","BLACK IN", 1] closedialog 821151552 ~0.1 DeathCam cameraEffect ["internal","front"] goto "start" nextCam.sqs ; ; Script for the spectating script v1.4 by Kegetys <Kegetys@dnainternet.net> ; http://www.ofp.kege.cjb.net ; _tries = 0 _DeathCamIndex = DeathCamIndex #notalive _DeathCamIndex = _DeathCamIndex + _this ? _this == 0 : goto "alive" ? _DeathCamIndex < 0 : _DeathCamIndex = (count DeathCamArray)-1 ? _DeathCamIndex >= count DeathCamArray : _DeathCamIndex = 0 ? alive (DeathCamArray select _DeathCamIndex) : goto "alive" _tries = _tries + 1 ; Avoid infinite loop if everyone are dead ? _tries < (count DeathCamArray)+1 : goto "notalive" exit #alive DeathCamIndex = _DeathCamIndex lbSetCurSel [1047002, DeathCamIndex] _name = name (DeathCamArray select DeathCamIndex) if (_name == "error: no unit") then {_name = ""} ctrlSetText [116969,_name] DeathCamCurTarget = (DeathCamArray select DeathCamIndex) missileCam.sqs ; ; Script for the spectating script v1.4 by Kegetys <Kegetys@dnainternet.net> ; http://www.ofp.kege.cjb.net ; modified version _m = nearestObject[_this select 0,_this select 4] _vel = abs(velocity _m select 0) + abs(velocity _m select 1) + abs(velocity _m select 2) ? isNull _m || !DeathCamMissileCamEnabled || _vel > 450 || DeathCamCineViewSpecial == 3 || !dialog : exit _id = random 1000000 DeathCamCurMissileCamTargetID = _id _kami = "camera" camCreate [5329.34,6652.10,1.28] _kami cameraEffect ["internal","front"] _kami camSetTarget _m _kami camSetRelPos [2,2,2] _kami camSetFOV 0.762 _kami camCommit 0 #luup ? !isNull _m : _kami camSetTarget _m ? !isNull _m : _kami camSetRelPos [0,-2,0.7] ? !isNull _m : _kami camCommit 0 _vel = abs(velocity _m select 0) + abs(velocity _m select 1) + abs(velocity _m select 2) ? !isNull _m && _vel > 1 : goto "luup" ~3.5 ? DeathCamCurMissileCamTargetID != _id : exit ? !dialog : exit titleCut ["","BLACK OUT", 0.5] ~0.5 titleCut ["","BLACK IN", 0.5] ? !dialog : exit _kami cameraeffect ["terminate", "back"] camdestroy _kami DeathCam cameraEffect ["internal","front"] Hope it helps cya. Nikiller. Edited March 30, 2011 by Nikiller Share this post Link to post Share on other sites
anguis 4 Posted March 30, 2011 Nikiller, that's going above and beyond - thank you! Share this post Link to post Share on other sites
faguss 65 Posted March 30, 2011 but I haven't found the description.ext text. Is it not needed in this version? FYI spectating script dialogs are defined in FDF bin\resource file. Share this post Link to post Share on other sites
Gunter Severloh 4070 Posted March 30, 2011 Theres also Troopmon2 http://www.armaholic.com/page.php?id=7948&highlight=TROOPMON Share this post Link to post Share on other sites
mk82 12 Posted January 2, 2014 (edited) Hello, I try to use the script nikiller postet in combination with Jörg F's respawn. But there occur some serious errors - sometimes causing the script to crash. I have been desperately trying to find the problems source for weeks now but I don't think I'll succeed anymore. This message comes almost everytime when we test the scripts online and "onPlayerRespawnAsSeagull.sqs" is executed: 'DeathCamCurCamTarget setpos[_moX,moY,moZ + DeathCamTarHeight]|#|': Error Type Any, expexted Number By now this error message just occured when I tested it in multiplayer, playing without others: '_seagull = _this select 2|#|': Error Zero divisor Maybe someone could help me please by localizing and fixing the problem? For a diagnosis I'll post the other scripts around those nikiller posted here - I copied the camscrpt 1 on 1, only adjusted the array of the players and added the line "DeathCamArray = [x,...]" one the beginning of "nextCam.sqs" because otherwise Players who died would be deleted from the array, indifferent if they still got a respawn left and keep on playing. I tested the script with and without that line and it makes no difference in view of the known errors. description (excerpt of respawn parameters) respawn = "instant" respawnDelay = 7.5 disabledAI = 1 init.sqs this exec "JorgF.sqs" goJ=playersNumber (Side Player); publicvariable "goJ" this exec "JorgFrespawn.sqs" this exec "deathcount.sqs" To make the camscript start just after a player has lost all his lives (Param1), and not after he got shot for the first time, I wrote a litte script namend deathcount: deathcount.sqs ? !(local player):exit _Count=Param1 _Count=_Count - 1 #Start @ not alive Player ~10 ? _Count <= 0 : [] exec "OnPlayerRespawnAsSeagull.sqs"; exit _Count=_Count - 1 goto "Start" Jörg F Respawn jorgf.sqs ? !(local player):exit #Runde JF = 0 @ JF == 1 or JF == 2 ? JF==1 : PMann switchMove "PutDownlyingtolying" ? JF==1 : PMann setdammage 0 ? JF==1 : PMann SetCaptive false ? JF==2 : [PMann] join grpnull goto "Runde" jorgfrespawn.sqs ? !(local player):exit Tote=Param1 #Start ~1.5 cam CameraEffect ["Terminate","Back"] CamDestroy cam #Runde1 _N = Player Player SetCaptive false Player setdammage 0 @ not alive Player Tote=Tote - 1 ? Tote < 1 and (group PMann) == GP : PMann = Player ; publicvariable "PMann";JF = 2 ; publicvariable "JF" ;------------------------------------------------- titlecut["","black out",5] _GW = weapons Player _MA = magazines Player _GW1 = count weapons Player _MA1 = count magazines Player ~(Random 1.5) goJ=goJ-1; publicvariable "goJ" @ alive Player #Runde6 deleteVehicle _N Player setdammage 0 Player SetCaptive True Player switchMove "LyingDying" ;------------------------------------------------- ~2 Removeallweapons Player _Z = 0 #Runde4 Player addmagazine (_MA select _Z) _Z = _Z + 1 ?_Z > _MA1 : goto "Weiter1" goto "Runde4" #Weiter1 _Z = 0 #Runde5 Player addweapon (_GW select _Z) _Z = _Z + 1 ?_Z > _GW1 : goto "Weiter2" goto "Runde5" #Weiter2 ;------------------------------------------------- titlecut["","black in",15] _W = (getdir Player) _X = (getpos Player select 0) _Y = (getpos Player select 1) _Z = (getpos Player select 2) #Runde2 ~1 _N = nearestobject [_X + (sin _W * 3) , _Y + (cos _W * 3),_Z] _W = _W + 45 _G = [] _G = _G + [_N] ? (("man" counttype _G == 1) and !(_N == Player)) and (Side _N ) == (Side Player) and (getdammage _N) < 0.8: goto "Ende" ? not alive Player : titlecut["","black out",3] ; goto "Runde3" goto "Runde2" #Ende ? Tote < 1 and (group PMann) == GP : PMann = Player ; publicvariable "PMann";JF = 2 ; publicvariable "JF" ? Tote < 1 : goto "Runde2" Player setdammage 0 player AddEventHandler ["Fired", {_This Exec "Script.sqs"}] goJ=goJ+1; publicvariable "goJ" PMann = Player ; publicvariable "PMann" JF = 1 ; publicvariable "JF" Player switchMove "PutDownlyingtolying" Player SetCaptive false _N = Player goto "Runde1" #Runde3 _N = Player @ alive Player goto "Runde6" I hope this is adequate information for an overview. Just ask if not. Edited January 2, 2014 by mk82 Share this post Link to post Share on other sites
nikiller 18 Posted January 3, 2014 hi, onPlayerRespawnAsSeagull.sqs must be executed like this https://community.bistudio.com/wiki/Event_Scripts I'm not sure it will work with respawn. IMHO, you should rename the script by onNewPlayerRespawnAsSeagull.sqs or something like that. cya. Nikiller. Share this post Link to post Share on other sites
mk82 12 Posted January 7, 2014 Now I'm using this: ReviveRespawn v1.57 Works good, but based on Kegety's spec 1.2 first-person isn't available. But it's running stable, that's priority! Share this post Link to post Share on other sites