Jump to content

sizraide

Member
  • Content Count

    111
  • Joined

  • Last visited

  • Medals

Everything posted by sizraide

  1. Hello, I've been looking around lately, but I can't seem to find any forum that explains how to place the camera to third person view. I'm trying to create a cutscene which a camera starts at initial position and moves into the position of third person view. For now I have a script that moves the camera into eye position of player. _camera camPreparePos getPosATL object; _camera camCommitPrepared 0; _camera camSetFocus [-1, -1]; _camera camPrepareFOV getObjectFOV player; _camera camPrepareTarget ASLToAGL ((eyePos player) vectorAdd ((eyeDirection player) vectorMultiply 25)); _camera camPreparePos ASLToAGL eyePos player; //Positions camera into player eye level. _camera camCommitPrepared 15;
  2. Yes, I do know that. But my point is I want the camera to move from its initial position to the position of the third person view camera. To create a transition scene from camera to third person view seamlessly.
  3. Hello, I'm using screenToWorld [0.5, 0.5]. But it only returns the position on landscape. I'm wondering how do I retrieve the position of what the player is looking at if it's in the sky? But only for 100 meters in distance. So for example, if player is looking at sky. Get the position of 100 meters distance relative to the players eye view. Because I'm trying to create a cutscene but the player is unfortunately looking at the sky in this scene. And I want to camera to eventually move into the players perspective for a smooth camera to player transition EDIT: The player is not looking at any object in the sky, just to clarify. _camera camPrepareFov 0.24; _camera camPreparePos [9212.05, 19240.1, 1.26343]; _camera camPrepareFocus [22.29, 1]; _camera camPrepareTarget getPosATL camera_tents; _camera camCommitPrepared 0; _camera camSetFocus [-1, -1]; _camera camPrepareFOV getObjectFOV player; _camera camPrepareTarget screenToWorld [0.5, 0.5] // Trying to change this position _camera camPreparePos ASLToAGL eyePos player; // Move camera position into players eye position _camera camCommitPrepared 13;
  4. It works! I appreciate your help.
  5. Hello, I'm trying to edit the properties of a "BIS_fnc_moduleEditTerrainObject" or Edit Terrain Object Module that's been placed and attached to a building in Eden Editor. I've looked into the config of this module and I want to change the Object State to destroyed of the object attached to this module. // building_ModuleOne is the variable name of the Edit Terrain Object module placed in Eden Editor. building_ModuleOne setVariable ["#state", 4]; // So far this is how I'm doing it, but it won't work - no error messages as well. Any help would be appreciated.
  6. Yes, but I wan't to change it via script. Because I want the building to be destroyed after a cutscene I am making.
  7. Hello, I'm creating an animated opening simlar to Tac-Ops intro. I have it all setup and stuff, but the resolution that was said in the wiki which is 2048x2048 is not really perfect for animated openings, unless I'm doing something wrong. Basically, the whole picture is not displayed, it's always zoomed in and the quality decreases drastically because of it. Here is what I typed in the _timeline for the picture to display: [MODE_LAYER_CREATE, 4,"img\introImg\test.jpg"] call bis_fnc_animatedScreen; [MODE_LAYER_ANIMATE, 4, 8, nil, 1, nil, 1] call bis_fnc_animatedScreen; Is there another way to do this?
  8. Hello, Somehow the setUnitPos "UP" is not working. When the unit is crouched, setUnitPos "UP" won't work; however, if the unit was prone then setUnitPos "UP" works. Is the command broken? I thought the AI was bugged when I used it so I recreated the unit but it still occurs, any thoughts?
  9. Oh, my bad. _unit is already defined, but the results still the same.
  10. Nope, just 3den Enhanced. My script is just: _unit setUnitPos "MIDDLE"; _unit setUnitPos "UP"; My unit has no animation, or anything to prevent it from crouching and standing up. EDIT: I've created other units and tested it on them, still the same results.
  11. Hello, I made a tiny script to add two waypoints. But as soon as the unit goes to the first one he doesn't move to the second one, help? nicholas enableAI "PATH"; // First waypoint _wp1 = group nicholas addWaypoint [getPos nicholas_wp_1, 0]; _wp1 setWaypointType "MOVE"; [group nicholas, 0] setWaypointVisible false; [group nicholas, 0] showWaypoint "NEVER"; [group nicholas, 0] setWaypointCompletionRadius 5; // Second waypoint _wp2 = group nicholas addWaypoint [getPos nicholas_wp_2, 1]; _wp2 setWaypointType "MOVE"; [group nicholas, 1] setWaypointVisible false; [group nicholas, 1] showWaypoint "NEVER"; [group nicholas, 1] setWaypointCompletionRadius 1;
  12. sizraide

    Waypoint issues

    Yep, tested it. He does.
  13. sizraide

    Waypoint issues

    I did this, and it still occurs? nicholas enableAI "PATH"; _grp = group nicholas; // first waypoint _wp1 = _grp addWaypoint [getPos nicholas_wp_1, 0]; _wp1 setWaypointType "MOVE"; _wp1 setWaypointVisible false; _wp1 showWaypoint "NEVER"; // second waypoint _wp2 = _grp addWaypoint [getPos nicholas_wp_2, 0]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointVisible false; _wp2 showWaypoint "NEVER";
  14. Hello, I'm creating a singleplayer mission. I wan't to add a notebook system where a player can press a key "N" and it would open a notebook GUI interface where the player can read their notes they've acquired throughout the mission. I'm in the process of trying to add notes into the ListBox here: notes.sqf // Notes createDialog "notes"; { private _noteName = _x; _ctrl = lbAdd [1500, _noteName]; } forEach ["Unfortunate Syrta", "FIA's purpose"]; But I am so confused. How do I make it so when a player clicks on an item in the list box it opens up a new display interface? Because I created multiple RscStructuredText classes for each note to display when a "note" is clicked inside the list box. I've read the GUI configuration page for List boxes multiple times but I am still confused on the lbAdd, lbSetPicture, etc... commands. My first attempt was to create a ButtonClick ctrlHandler that would activate when an item is clicked inside the list box, I still haven't been able to write the script for that yet. No idea if it would work. Any help is appreciated, thanks.
  15. sizraide

    RscListBox confusion...

    Fixed, appreciate it.
  16. sizraide

    RscListBox confusion...

    KeyDown doesn't seem to work here? No errors pop up when I press ENTER button. with uiNamespace do { [] spawn { textDisplay = findDisplay 46 ctrlCreate ["RscStructuredText", 1100]; textDisplay ctrlSetPosition [0.380469 * safezoneW + safezoneX, 0.534 * safezoneH + safezoneY, 0.227109 * safezoneW, 0.102 * safezoneH]; textDisplay ctrlSetBackgroundColor [0,0,0,1]; textDisplay ctrlSetText "All choices you pick will shape your character in the story for the whole mission, pick wisely."; textDisplay ctrlSetFontHeight 0.035; textDisplay ctrlCommit 0; buttonDisplay = findDisplay 46 ctrlCreate ["RscButton", 1600]; buttonDisplay ctrlSetPosition [0.380469 * safezoneW + safezoneX, 0.636 * safezoneH + safezoneY, 0.227109 * safezoneW, 0.051 * safezoneH]; buttonDisplay ctrlSetBackgroundColor [0,0,0,0.5]; buttonDisplay ctrlSetText "Press 'ENTER' to confirm"; buttonDisplay ctrlSetFontHeight 0.035; buttonDisplay ctrlCommit 0; }; }; (findDisplay 46) displayAddEventHandler ["keyDown", { switch (_this select 1) do { case 28: { { ctrlDelete (uiNamespace getVariable _x) } forEach [buttonDisplay, textDisplay]; findDisplay 46 displayRemoveAllEventHandlers "KeyDown"; }; case 156: { { ctrlDelete (uiNamespace getVariable _x) } forEach [buttonDisplay, textDisplay]; findDisplay 46 displayRemoveAllEventHandlers "KeyDown"; }; }; false }];
  17. sizraide

    RscListBox confusion...

    I appreciate the help, sorry for the long replies I get caught up in work. But is there any possible way to keep a dialog/display open after the person presses ESC? So the person can still access the main menu but the dialog will remain opened.
  18. sizraide

    RscListBox confusion...

    I haven't had any luck with using it because I have no clue on how to use it. Could you give me an example of it being used? Thanks.
  19. sizraide

    RscListBox confusion...

    Okay, I managed to fix everything so far and reach my end goal. I just have on issue with uiNamespace do { ctrl = findDisplay 46 ctrlCreate ["RscStructuredText", 2000]; ctrl ctrlSetPosition [0.398398 * safezoneW + safezoneX , 0.211 * safezoneH + safezoneY, 0.322734 * safezoneW, 0.663 * safezoneH]; ctrl ctrlSetFont "EtelkaMonospacePro"; ctrl ctrlCommit 0; ctrl ctrlSetBackgroundColor [0,0,0,0.7]; }; When I try to access "ctrl" variable it does not get recognized in other scripts, how can I access it?
  20. Hello, I'm creating a singleplayer scenario. I created a GUI to choose difficulty for a singleplayer mission at the beginning of the mission. But the GUI can be closed by pressing ESC, I wonder if there's any countermeasures to avoid that? So the player can't close it until he chooses a difficulty. controls.hpp menuDiff.sqf
  21. sizraide

    Keep createDisplay open

    Appreciate the help! I managed to fix it here: // Open GUI _display = findDisplay 46 createDisplay "chooseDifficulty"; // Add UI EventHandler _display displayAddEventhandler["KeyDown",{ params ["", "_key"]; _key == 1 }]; // Wait for confirmation waitUntil{ok}; // Enable borders [0, 0, false, true ] spawn BIS_fnc_cinemaBorder; // Remove displayHandler findDisplay 46 displayRemoveAllEventHandlers "KeyDown"; // Close display finally _display closeDisplay 1;
  22. sizraide

    Keep createDisplay open

    // Open GUI _display = findDisplay 46 createDisplay "chooseDifficulty"; // Add UI EventHandler _displayHandler = (findDisplay 46) displayAddEventhandler["KeyDown",{ params ["_display","_key"]; if (_key == 1) exitWith {true}; false }]; waitUntil{ok}; // Remove displayHandler (findDisplay 46) displayRemoveEventHandler ["KeyDown", _displayHandler]; I made an displayEventHandler, this doesn't seem to be working? Any clues? When I press ESC, it still closes the display. But no error pops up.
  23. I have this script that changes the loadout of a unit testGroup = createGroup [independent, true]; testGroup = [getPos trg1, independent, (configfile >> "CfgGroups" >> "Indep" >> "IND_F" >> "Infantry" >> "HAF_InfSquad")] spawn BIS_fnc_spawnGroup; { [_x] execVM "unit_loadouts\checkgear.sqf" } forEach units testGroup; OR (units testGroup) apply {[_x] execVM "unit_loadouts\checkgear.sqf"}; I'm trying to create a group, and apply the script to each member of the group using apply. Don't know if there is another way, couldn't find any other way.
  24. sizraide

    Using apply on group units

    It works now, appreciate it. Sleep 0.5 did the trick.
  25. sizraide

    Using apply on group units

    Yeah, the weapons and equipments are not changing. The group spawns perfectly fine, when I execute the code no error pops up. So I can't tell what the issue.
×