Jump to content

-ORION-

Member
  • Content Count

    25
  • Joined

  • Last visited

  • Medals

Posts posted by -ORION-


  1. On activation:

    if (isServer) then 
    {
     {
        "Landed" remoteExec ["hint",owner _x]
     } forEach thisList;
    };

    Not tested, but should work ;)

     

    Edit: In the future I'd rather use a 3D trigger instead of isTouchingGround, because the latter can sometimes f

    Thank you Revo. Works great so far with the limited testing Ive done. In the future (when we can adjust trigger height), would I just set the height to zero? How would my above expression change for my condition box? Cheers for the help, of course.


  2. Whenever I check out a new terrain, I like to take out the Little Bird and practice landing in all sorts of locations. I've recently decided to polish up my simple, ad hoc "missions" and publish them as workshop scenarios for others to use. My issue is a minor one, but still annoying, and I suspect there's a simple solution for it.

     

    I've set up LZs with triggers across the terrain that recognize when players land in the designated areas using this in the condition box:

    {_x isKindOf "Helicopter" && isTouchingGround _x} count thisList > 0
    
    

    I then have a hint pop up telling the player they have successfully landed at such and such landing zone. All works well, except that each player on the server sees hints that don't pertain to them. Peter activates a hint after landing at LZ Alpha, but Paul and Mary see the hint as well while flying to their own LZs across the map.

     

    Is there a way to modify my above expression so trigger hints are only activated for the pilot who did the triggering? Thanks in advance.


  3. The whole things been rewritten for 1.56

    From a few quick test you shouldn't need much more than this...

    //initPlayerLocal.sqf
    #include "\a3\functions_f_mp_mark\Revive\defines.hpp"
    
    systemChat "Saving initial loadout";
    //Save initial loadout
    [ player, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_saveInventory;
    
    
    //Save loadout when ever we exit an arsenal
    [ missionNamespace, "arsenalClosed", {
    	systemChat "Arsenal closed";
    	[ player, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_saveInventory;
    }] call BIS_fnc_addScriptedEventHandler;
    
    
    player addEventHandler [ "Respawn", {
    
    	systemChat "Respawning";
    	systemChat format[ "state %1", GET_STATE_STR(GET_STATE( player )) ];
    
    	if ( GET_STATE( player ) == STATE_RESPAWNED ) then {
    		systemChat "Died or Respawned via menu";
    		_templates = [];
    		{
    			{
    				_nul = _templates pushBackUnique _x;
    			}forEach ( getMissionConfigValue [ _x, [] ] );
    		}forEach [ "respawntemplates", format[ "respawntemplates%1", str playerSide ] ];
    
    		if ( { "menuInventory" == _x }count _templates > 0 ) then {
    			systemChat "Respawning - saving menu inventory";
    			[ player, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_saveInventory;
    		}else{
    			h = [] spawn {
    				sleep playerRespawnTime;
    				systemChat "Respawning - loading last saved";
    				[ player, [ missionNamespace, "currentInventory" ] ] call BIS_fnc_loadInventory;
    			};
    		};
    
    	}else{
    		systemChat "Incapacitated";
    	};
    }];
    The whole problem with Incapacitated state on saving/reapplying your gear seems to have been fixed.

    Have not test the menuInventory side of things as it is currently broken.

    Heres a hint showing some of the available variables and there values wrapped in a OEF.

    [ "OEFRevive", "onEachFrame", {
    	_msg = "Unit States\n";
    	_msg = format[ "%1\nBroadcasts\n", _msg ];
    	{
    		_msg = format [ "
    			%1
    			%2 - %3\n
    			",
    			_msg,
    			_x,
    			player getVariable [ _x, "nil" ]
    		];
    	}forEach [
    		VAR_TRANSFER_STATE,
    		VAR_TRANSFER_FORCING_RESPAWN,
    		VAR_TRANSFER_BEING_REVIVED
    	];
    	_msg = format[ "%1\nLocal\n", _msg ];
    	{
    		_msg = format [ "
    			%1
    			%2 - %3\n
    			",
    			_msg,
    			_x,
    			player getVariable [ _x, "nil" ]
    		];
    	}forEach [
    		VAR_STATE,
    		VAR_STATE_PREV,
    		VAR_BEING_REVIVED,
    		VAR_FORCING_RESPAWN,
    		VAR_HELPER,
    		VAR_DAMAGE,
    		VAR_BLOOD
    	];
    	_msg = format[ "%1\nStates\n", _msg ];
    	{
    		_msg = format [ "
    			%1
    			%2 - %3\n
    			",
    			_msg,
    			_x select 0,
    			_x select 1
    		];
    	}forEach [
    		[ "STATE_RESPAWNED", STATE_RESPAWNED ],
    		[ "STATE_REVIVED", STATE_REVIVED ],
    		[ "STATE_INCAPACITATED", STATE_INCAPACITATED ],
    		[ "STATE_DYING", STATE_DYING ],
    		[ "STATE_DEAD", STATE_DEAD ],
    		[ "STATE_DOWNED", STATE_DOWNED ]
    	];
    	hintSilent _msg;
    }] call BIS_fnc_addStackedEventHandler;
    
    Just run it somewhere in your initPlayerLocal.sqf as it needs the defines (included in script above) to work.

     

    Just tested this. The only issue is backpacks for SOME players are duplicated on revive. Very odd. When respawning there seems to be no issues, just on revives. Once or twice a revived player was given their default class backpack in place of the one they chose from the arsenal. The one they were wearing before being revived remains on the ground. And by default class backpack I mean the backpack that came with the character they chose at the server lobby screen. Any ideas larrow, tankbuster, or others?


  4. lacked put the same name of "GAME LOGIC" within the field.

    Name Game Logic = ABC

    *Place the icon "LOGIC GAME" on the building to be destroyed.

     

     

    INIT GAME LOGIC: 

     

    TOWER = nearestObject [ABC, "Land_TTowerBig_1_F"];

     

     

    TRIGGER

    COND:  !alive TOWER;

     

    Hence my example, and my labeling it nameofgamelogic, and me stating that you can name it whatever you want, just like the variablename. But hey, whatever helps folks out.


  5. Nevermind, got it working with some major help from Caboose816. You sir are a gentleman and a scholar. For any fellow noobs who want to link map objects to triggers post Eden update (in this case, to destroy them), here's how we did it.
     
    1. Find out the classname of the object you want to destroy. You can use the Eden editor to find objects pretty quickly, especially using the search function. Say we want to blow up one of the large comm towers on Stratis. Type tower in the search field of the editor and then place a few of them until you see the desired tower. Hover your cursor over it and voila, there's your classname. In this case, the large comm tower is Land_TTowerBig_1_F.

     

    Alternatively, you can use this very handy page to find virtually every object's classname and it's image: http://https://community.bistudio.com/wiki/Arma_3_Assets

     

    2. Create a Game Logic and name it.

    3. In the Game Logic's init field put the following:

    variableName = nearestObject [nameofgamelogic, "***CLASS NAME OF OBJECT***"];
    

    The variableName can be whatever you like, as can the Game Logic name. For our tower example it will look like this:

    tower = nearestObject [logic1, "Land_TTowerBig_1_F"];
    

    4. Create a trigger

    5. In the trigger condition field put the following:

    !alive tower;
    

    6. Enjoy

     

    Again, credit to Caboose816 for helping me out.

    • Like 1

  6. I quickly tested as well with several different arsenal loadouts and multiple respawns. Seems to be working. Haven't tested it with revive yet though - my Arma buddies are at work. Also, it seems to revert to your current loadout at the time of your death, i.e. if you used all but 1 magazine for your MX, you'll spawn with only 1 mag. Same for rockets/missiles, pistol mags, etc. I'm sure this follows for all equipped gear, but I only spent a quick few mins with it.

     

    Many thanks to R3vo.


  7. Hello all. I imported one of my missions into the Eden editor and found an issue that needs fixing.

     

    The task in this case is destroying radio towers. I set this up in the 2D editor by creating a trigger the size of the tower, choosing not present, and then grouping it (f2) to the actual tower. This creates a static object activation type, which suits my needs perfectly.

     

    I cannot seem to group triggers to terrain objects in the Eden editor, so I can't get that much needed static object activation type to appear within the trigger parameters. I've tried using the map mode in the Eden editor, but there is no option there either. Right clicking, selecting "Connect," and "Set Trigger Owner," still doesn't give the option to group the trigger to static objects.

     

    Any ideas? I'm probably just missing something. Thanks in advance.


  8.  

    It is, adding an extra checkbox which enables gear saving is done in few minutes. However, it would require a mod. You can still do it the old way for now.

     

    create two files in your mission root

     

    onPlayerRespawn.sqf

    [player, [missionNamespace, "inventory_var"]] call BIS_fnc_loadInventory;

    onPlayerKilled.sqf

    [player, [missionNamespace, "inventory_var"]] call BIS_fnc_saveInventory;

     

    Is that really all that's needed to retain our virtual arsenal loadouts after revive/death/respawn? By the beard of Zeus, if this works.....

     

    For SP and MP?

    • Like 1

  9. Syntax error sorted! Thanks to KK and ted_hou for the help on that one. Now if anyone has any suggestions for the the audio issues, I'm all ears. Perhaps someone knows some optimal video dimensions or aspect ratios? I can only seem to find the occasional mention of folks using 16:9. I'll experiment, but if any of you have dealt with this issue before, feel free to chime in.


  10. Hey all, just a couple quick questions from a bonafide A3 editing noob. Thanks in advance for any help thrown my way.

     

    Ive been tinkering with adding an intro video and establishing shot to the start of a mission. After cobbling together code from several (old) forums I've come up with this:

     

    init.sqf:

    [] spawn {
        scriptName "initMission.hpp: mission start";
        ["A3_intro_video.ogv", false] spawn BIS_fnc_titlecard;    
        waitUntil {!(isNil "BIS_fnc_titlecard_finished")};
        [position player,"Will the BIS A3 forumites be kind to this lowly mission editor?",100,200,45,1,[]] spawn BIS_fnc_establishingShot;   
            
              };
    

    The good news is that both the video and establishing shot work. The bad news is while previewing the mission, the video's audio cuts in and out annoyingly and I get this error:

     

    [bIS_fnc_titlecard] #1: false is type BOOL, must be STRING. "" used instead.

     

    Any ideas? Does the error have anything to do with the audio cutting in and out on my .ogv or is it just a syntax problem? Video is 1920x1080, 60 fps, 10 seconds in length, and converted from a shadowplay .mp4.

     

     

×