-
Content Count
431 -
Joined
-
Last visited
-
Medals
Everything posted by BEAKSBY
-
onEachFrame and findDisplay script question
BEAKSBY replied to BEAKSBY's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Done and done. Init.sqf ObjectPositionAndDirectionD.sqf ArmorDrop.sqf SlammerUp1_CA.paa The last thing I'm trying to do with this is raise the camera view of the 3rd person so the player can have a better view of the location of the ghost vehicle placement AND have an array of vehicles to select from. ---------- Post added at 22:06 ---------- Previous post was at 21:56 ---------- http://forums.bistudio.com/showthread.php?178031-How-to-change-camera-settings-in-game-with-addAction -
onEachFrame and findDisplay script question
BEAKSBY replied to BEAKSBY's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I've added a custom paa for the Slammer using photoshop and transparent background so you see a picture, description and price of the vehicle in the addAction menu. I'll post this when I back home tonight. I was going to use a dialog script from Iceman77 "http://forums.bistudio.com/showthread.php?170384-Dialogs&highlight=money+scripts" to list all the vehicles to drop called in by a "vehicle drop" addAction. And do something similar for emplacements (HMG, GMG, AT tripid, AA tripod) and radio support (Air strike, Artillery and UAV recon). The only major issue I have now is when testing on LAN I noticed the opposing player can see the vehicle being placed and rotating. Only the player calling it in should have visibility and the opponent side should only see the resulting smoke and spawn vehicle paradrop-in. -
onEachFrame and findDisplay script question
BEAKSBY replied to BEAKSBY's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks once more F2K Sel! I added _veh setVehicleLock "LOCKED"; for my final contribution. There were some very strange things happening if you entered the ghost vehicle. So I locked it. It seems to run very smoothly now. I think this file is closed. -
How to change camera settings in game with addAction?
BEAKSBY posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi Folkes, I want to be able to switch to a differnent camera angle while in game then be able to switch back to the default INTERNAL or EXTERNAL settings. Can this be done through an sqf triggered via an addAction? Below is the example script from camCommit but does not allow me to control the player while it's running. How do I enable regular gameplay while in the set view from below? private "_cam"; comment "create a camera object"; _cam = "camera" camCreate [position player select 0, position player select 1, 2]; _cam camSetTarget player; _cam cameraEffect ["internal", "BACK"]; _cam camCommit 0; comment "smoothly move the camera to its new position in 6 seconds"; _cam camSetPos [position player select 0, (position player select 1) + 10, 20]; _cam camCommit 6; waitUntil { camCommitted _cam; }; _cam cameraEffect ["terminate","back"]; camDestroy _cam; -
Why won't this camera script work? I want the camera to hover over the player so they can see from above. private "_cam"; // "create a camera object"; _cam = "camera" camCreate [position player select 0, (position player select 1) - 10, 50]; player switchCamera "_cam"; _cam camCommit 3;
-
Yes, and it remained frozen. How would I get the camera to follow the player from 10m above and 5m behind and pan with the player as he turns, in otherwords change the 3rd person view settings? Do you know of any premade simple scripts I can paste to my sqf? I want this for part of an action that allows the player to call in emplacements and vehicles around them so they can see the terrain better. And if I want ot go back to the default 1st person and 3rd person view I assume I press the ALT key?
-
Thanks Zapat, I did also try it with the following 2 scripts below switched and it did not work. It remains locked in the view above the player. I cannot move, or change views or use the menus. I have to end the mission to get out. camDestroy _camera; _camera cameraEffect ["terminate","back"];
-
Can AI ride vehicles if there are no passengers seats?
BEAKSBY posted a topic in ARMA 3 - QUESTIONS & ANSWERS
Can the AI ride teh vehicles if there are no passenger seats? Is there a script that can simulate this, if so please send link. Thanks -
onEachFrame and findDisplay script question
BEAKSBY replied to BEAKSBY's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks, puzzle solved! I tested with removing the displayremoveeventhandler and that seemed to solve the rotation issue. Much Apprecitated! I'm also trying to add a camera angle script for when this is called so the player's camera will be raised higher above their head and a bit behind them so they can better see where they are calling in the ghost vehicle positions. If I wanted to cancel the ghost image of the vehicle and backout of the sqf I tried to use missionnamepsace with the backspace variable "cancel". But is causing problems when I delete _veh in the loop. -
It did not do anything... I've tried this too and it locks up in the camera view and won't terminate. _camera = "camera" camCreate [(position player select 0), (position player select 1) - 10, 10]; _camera cameraEffect ["external", "back"] _camera camSetTarget player; _camera attachTo [player,[0,0,50]]; _camera camCommit 5; //sleep 3; camDestroy _camera; _camera cameraEffect ["terminate","back"];
-
I'm still not getting the camera to remain in position above the player's offset position: THis is called in from an addAction command: _camera camSetTarget player; _camera = "camera" camCreate [position player select 0, (position player select 1) - 10, 10]; onEachFrame { _camera attachTo [player,[position player select 0, (position player select 1) - 10, 10]]; // _camera setPos [position player select 0, (position player select 1) - 10, 10]; THIS ALSO DOES NOT WORK _camera camCommit 3; if (missionnamespace getvariable ["place",false]) exitwith {}; }; // end of while/oneachframe
-
onEachFrame and findDisplay script question
BEAKSBY replied to BEAKSBY's topic in ARMA 3 - MISSION EDITING & SCRIPTING
YES, this works and it's much faster too! How would I simulate pressing the "backspace" button to clear the addActions in the window before pressing down on the mouse wheel. Otherwise, when rolling the mouse wheel to re-orient the vehicle then next addAction will be activated uppon the pressing down on the mouse wheel. Don't you have to remove the enventhandlers with displayRemoveEventHandler when finished with this script? I noticed everytime you run it, the rotation degrees increase, so by the time you've run it a 10th time it no longer rotates evevery degree, more like every 15 or 30 degrees. Finally, the vehicle should not be able to push the player backwards. I suppose I could resolve this with some distancing restrictions. Thanks again! -
I placed the above camera script in an sqf that gets called by an addAction. There is no change in the camera angle or view. I thought it would switch to a camera view that is at the player position, 10m behind and 50m above him?
-
onEachFrame and findDisplay script question
BEAKSBY replied to BEAKSBY's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks F2K Sel, I didn't any noticieable lag on my system, but may likely to occur when playing MP over the INTERNET. You script works, and I tried it initially that way too by moving the vehicle, but not sure how you prevent it from being destroyed if it slides through buildings etc. That's why I went with the create and delete inside the loop. Perhaps I can modify so it does the every 2 or 3rd frame? I call your script from an addAction, for some reason I can only run it once, then the next time I run the vehicle appears but cannot rotate or reposition it? Thanks for the mouse wheel portion too! I adjusted to 15 degree increments and this work faster. But it interferes with the default addAction commands so I changed it to Q and E instead. Also, the Armo.sqf should only be called after the vehicle is deleted. But I don't think you can put this in the onEachFrame loop. Otherwise it executes as soon as you press the addAction command. image = "\A3\armor_f_gamma\MBT_01\Data\ui\map_slammer_mk4_ca.paa"; _txt = composeText ["Cannot place", image _image, image _imageText, _separator1, "here"]; if (!isnull cursortarget) then {hint _txt}; disableserialization; // to rotate vehicle use mouse scroll wheel // to terminate and spawn press middle mouse button down. dir1 = 0;// may need changing to setvariable private ["_heli"]; // setup mouse/keyboard buttons waituntil {!(IsNull (findDisplay 46))};//test 1 _KeyDownQ = (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 == 18) then {dir1=dir1+5}"];// E key _KeyDownE = (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 == 16) then {dir1=dir1-5}"];// Q key // _mouseZ = (findDisplay 46) displayAddEventHandler ["MouseZChanged","if ((_this select 1) <0) then {dir1=dir1+15} else {dir1=dir1-15}"];// mouse scroll // _mouseM = (findDisplay 46) displayAddEventHandler ["MouseButtonDown", "if (_this select 1 == 2) then {missionnamespace setvariable ['place',false]};"];// middle mouse button down // Create and delete vehicle onEachFrame { _pos = screenToWorld [0.5,0.5];// land position if (!isnull cursortarget) then { _pos = [0,0,0]}; // cannot create inside building or object position _heli = createVehicle [ "B_MBT_01_TUSK_F", [(_pos select 0), (_pos select 1), (_pos select 2) +0.5], [], 0, "CANNOT_COLLIDE" ]; _heli setpos _pos; _heli setDir (getdir player )+ dir1; _heli setVectorUp surfaceNormal position _heli; _heli setObjectTexture [0, "#(rgb,8,8,3)color(0,0.5,0,1)"]; _heli setObjectTexture [1, "#(rgb,8,8,3)color(0,0.5,0,1)"]; _heli setObjectTexture [2, "#(rgb,8,8,3)color(0,0.5,0,1)"]; deleteVehicle _heli; waituntil {!(IsNull (findDisplay 46))}; _mouseM = (findDisplay 46) displayAddEventHandler ["MouseButtonDown", "if (_this select 1 == 2) then {onEachFrame {};}"]; sleep 0.01; }; // end of while/oneachframe //deleteVehicle _heli;// remove Ghost sleep 0.1;// allow time for removal of Ghost // Spawn actual vehicle or call another script ** BUT THIS SHOULD ONLY BE CALLED IN AFTER THE VEHICLE IS DELETED ** // [] execVM "ArmorDrop.sqf"; /* ** BUT THIS SHOULD ONLY BE CALLED IN AFTER THE VEHICLE IS DELETED ** _pos = screenToWorld [0.5,0.5]; _heli = createVehicle [ "B_MBT_01_TUSK_F", [(_pos select 0), (_pos select 1), (_pos select 2) + 0.50], [], 0, "CANNOT_COLLIDE" ]; _heli setDir (getdir player )+ dir1; _heli setVectorUp surfaceNormal position _heli; */ -
What are the keynames for the mouse wheel? Specifically pushing it down, rolling up and rolling down. I used the following but it only worked for keyboard keys: waituntil {!(IsNull (findDisplay 46))}; _keyDown = (findDisplay 46) displayAddEventHandler ["KeyDown", "hint str _this"];
-
Positioning and Orient Object Script while in game?
BEAKSBY replied to BEAKSBY's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Close...I was thinking a cross between GID and ZEUS? ...anyone know of something similar? -
Hi All, There are a number of BIS_fnc here in the Arma 3 CfgFunctions. How do I see the code for those that do not have a BIKI? I would like to see the code for BIS_fnc_bleedTickets and modifiy, see below... I want to create sectors in my missions, some that will act as strategic objectives to bleed out the opponent's side score using the bleedTicket module synced to the repawnTicket module and other sectors that when captured do not affect their score. I want these second type of sectors for their animation on screen showing the capture progress bar, location on map and they will unlock addAction commands for those that have control of them (like spawning in reinfocements...etc.) As soon as I add a bleedTicket module synced to the repawnTicket module in the editor, all sectors captured affect the bleedout score. They do not have to be synced or grouped to these modules. Adding a second pair of bleedTicket module synced to the repawnTicket module does not impact anyting even if I change the delay bleed rate or amount of bleed tickets per second. Any help would be greatly appreciated.
-
Will this addAction script command with player is work in MP?
BEAKSBY posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
LAN Testing Vs Internet Testing OK, So I tested in MP against myself by running two windowed sessions, with -noPause, of ARMA3 and set-up the game on a LAN, and it does what I want. I read at the bottom of the player BIKI that: GalZohar Before you use the player object (usually to avoid JIP issues) all you need is to run: waitUntil {!isNull player}; Anything else you see in other scripts is equivalent and/or redundant. Of course JIP players may need more than just the player to point at the actual JIP player unit, but that's script/mission-specific. So I modified my init.sqf to the following, but I'm not sure that adding the condition !isNull player if this has the same impact playing over the Internet? Will this work in MP? ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// If (side player == WEST) then {// for west units // PREVIOUS SCRIPT VERSION player addAction ["<t color='#FF0000'>M2A4 Slammer UP $1200</t>", "ArmorDrop.sqf",[],0,true,true,"","sector1 getVariable 'owner' == side _this and _this == _target"] ; player addAction ["<t color='#FF0000'>M2A4 Slammer UP $1200</t>", "ArmorDrop.sqf",[],0,true,true,"","sector1 getVariable 'owner' == side _this and _this == _target && ((screenToWorld [0.5,0.5]) distance (_target) < 100)"] ; player addEventHandler ["RESPAWN", { _id = [] spawn { waituntil {alive player && !isNull player};// Wait until the player object has been initialized for the join in progress player's machine player addAction ["<t color='#FF0000'>M2A4 Slammer UP $1200</t>", "ArmorDrop.sqf",[],0,true,true,"","sector1 getVariable 'owner' == side _this and _this == _target && ((screenToWorld [0.5,0.5]) distance (_target) < 100)"]; }; }]; } else {// change this for east units player addAction ["<t color='#FF0000'>T-100 Varsuk $1200</t>", "O_ArmorDrop.sqf",[],0,true,true,"","sector1 getVariable 'owner' == side _this and _this == _target"] ; player addEventHandler ["RESPAWN", { _id = [] spawn { waituntil {alive player && !isNull player}; player addAction ["<t color='#FF0000'>T-100 Varsuk $1200</t>", "O_ArmorDrop.sqf",[],0,true,true,"","sector1 getVariable 'owner' == side _this and _this == _target"]; }; }]; }; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -
Will this addAction script command with player is work in MP?
BEAKSBY replied to BEAKSBY's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I tried it as a pbo and it gives the same result. I think the problem has to do with the function not being called as the other player is not calling it from the host server? See post herehttp://forums.bistudio.com/showthread.php?177737-Is-this-not-working-because-of-quot-isServer-quot-in-my-script. -
How do I get teh 4-five heavy pistol to display in 1st person view or is this a know issue?
-
Is this not working because of "isServer" in my script?
BEAKSBY posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
When I test on LAN the joining player can create the tank, but when it calls the paradroptank function the parachute does not deploy like it is supposed to. It only deploys for the player hosting the game. This is the init.sqf that preloads a player addAction command to execute the ArmorDrop.sqf that then calls the the KK_fnc_paraDropTank at the top of the init. This is the ArmorDrop.sqf that calls on the KK_fnc_paraDropTank from the top of the init.sqf: Or is something wrong with the order? Should I be including all this in the init.sqf too or create separate .sqf scripts? These addActions will be called frequently in the MP game. -
Can addAction be called from player in a vehicle?
BEAKSBY posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi Folkes, In my init.sqf script below, for MP, my player has to step out of his vehicle to call the addAction that executes "ArmorDrop.sqf" or "O_ArmorDrop.sqf", depending whether they are EAST or WEST. Can an addAction be called from inside the vehicle, if so, how? Part of my init.sqf: -
Can addAction be called from player in a vehicle?
BEAKSBY replied to BEAKSBY's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yup, that solved it. Thanks! -
Will this addAction script command with player is work in MP?
BEAKSBY replied to BEAKSBY's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I've used cpbo to create SECTORS%20MP%20TESTINGAAA.Stratis.pbo but when I go to MULTIPLAYER it's not in my list of MP games? How do I play the pbo file? -
How to create a sector module that does not affect bleedTickets?
BEAKSBY posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi All, There is no Biki Page on BIS_fnc_bleedTickets. Does anyone know how to get the code from BIS on this function? I want to create sectors in my missions, some that will act as strategic objectives to bleed out the opponent's side score using the bleedTicket module synced to the repawnTicket module and other sectors that when captured do not affect their score. I want these second type of sectors for their animation on screen showing the capture progress bar, location on map and they will unlock addAction commands for those that have control of them (like spawning in reinfocements...etc.) As soon as I add a bleedTicket module synced to the repawnTicket module in the editor, all sectors captured affect the bleedout score. They do not have to be synced or grouped to these modules. Adding a second pair of bleedTicket module synced to the repawnTicket module does not impact anyting even if I change the delay bleed rate or amount of bleed tickets per second. Any help would be greatly appreciated.