Jump to content

Recommended Posts

9dMYOI8.jpg

 

On Mission Preview was overhauled. The new controls uses less space, allows for an instant reset and creates room for further expansion of the attribute.

  • Like 5
  • Thanks 1

Share this post


Link to post
Share on other sites

 

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites

 Hmm  I might have seen that before... 😄 

 

Just a suggestion: you can update the search results while the user is typing. Here is the script I use:

https://github.com/7erra/-Terra-s-Editing-Extensions/blob/master/TER_editing/gui/scripts/RscNamespaceVars.sqf

Just a simple spawned KeyDown UIEH with a check if the text of the editbox changed. This works for listboxes with not that many entries. If there are quite a few and the engine takes too long for each lnbAdd then it might happen that the user can type faster than the listbox updates and results from the previous search get carried over if that makes sense.

  • Like 1

Share this post


Link to post
Share on other sites
7 hours ago, 7erra said:

 Hmm  I might have seen that before... 😄 

 

Just a suggestion: you can update the search results while the user is typing. Here is the script I use:

https://github.com/7erra/-Terra-s-Editing-Extensions/blob/master/TER_editing/gui/scripts/RscNamespaceVars.sqf

Just a simple spawned KeyDown UIEH with a check if the text of the editbox changed. This works for listboxes with not that many entries. If there are quite a few and the engine takes too long for each lnbAdd then it might happen that the user can type faster than the listbox updates and results from the previous search get carried over if that makes sense.

Yeah, as I wrote in the comment section of your mod, I was working on something similar and I felt like it would be a waste to trash it.

 

Thanks for the script. I use something similar for 3den Radio, only that I use the KeyUp EH which provides a bit more time for the listbox to update before the user types again.

 

I also found a solution for the overflow issue (Text from one column overlapping with next column) which I am going to add to your respository.

 

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Hi, i saw so many script or way to export objects from Eden Editor. But none of them found a way to import stuff... 

 

I saw many people in my case and i want to ask if someone can help us. I explain :

 

I want to add sqf code into eden editor.

 

In my case i want to add this : 

 

private ["_objs"]; 
_objs = [ 
 ["Land_Pier_F",[24159.2,18967.5,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24130,18937.7,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24100.8,18907.9,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24119.4,18948.1,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24079.6,18928.6,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24156.5,19028.4,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24127.4,18998.6,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24098.2,18968.8,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24069,18939,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24145.9,19038.7,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24116.8,19008.9,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24087.5,18979,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24056.9,18951.3,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Scaffolding_F",[24154.5,18980.5,11.3455],0,[[0.70484,0.709366,0],[0,0,1]],false], 
 ["Land_Pier_F",[24167.1,19018,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24108.8,18958.4,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24138,18988.2,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24140.6,18927.3,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24111.4,18897.5,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24169.8,18957.1,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24198.9,18986.9,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false] 
]; 

 

I can import the in a mod file or in the mission file by using this code 

 

{
    private ["_obj"];
    _obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
    if (_x select 4) then {
        _obj setDir (_x select 2);
        _obj setPos (_x select 1);
    } else {
        _obj setPosATL (_x select 1);
        _obj setVectorDirAndUp (_x select 3);
    };
} foreach _objs;

 

The thing is with eden it's working but we cannot edit objects ! I am sure it's possible because i have found a code to do it but cannot found it anymore, haven't touch arma 3 since 6 months. (and the version of Eden editor was the same..)

 

I know there is a way with create3DENEntity and set3DENAttribute.

 

If you can add something like this it will be awesome !!! (Sorry for my pretty bad english)

 

Cheers

 

 

 

 

Share this post


Link to post
Share on other sites

Please add new aniamtions. Great Mod! I love it!

Share this post


Link to post
Share on other sites
3 hours ago, Magik BZH said:

Hi, i saw so many script or way to export objects from Eden Editor. But none of them found a way to import stuff... 

 

I saw many people in my case and i want to ask if someone can help us. I explain :

 

I want to add sqf code into eden editor.

 

In my case i want to add this : 

 

private ["_objs"]; 
_objs = [ 
 ["Land_Pier_F",[24159.2,18967.5,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24130,18937.7,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24100.8,18907.9,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24119.4,18948.1,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24079.6,18928.6,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24156.5,19028.4,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24127.4,18998.6,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24098.2,18968.8,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24069,18939,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24145.9,19038.7,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24116.8,19008.9,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24087.5,18979,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24056.9,18951.3,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Scaffolding_F",[24154.5,18980.5,11.3455],0,[[0.70484,0.709366,0],[0,0,1]],false], 
 ["Land_Pier_F",[24167.1,19018,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24108.8,18958.4,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24138,18988.2,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24140.6,18927.3,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24111.4,18897.5,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24169.8,18957.1,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false], 
 ["Land_Pier_F",[24198.9,18986.9,6.80911],0,[[-0.714912,0.699215,0],[0,0,1]],false] 
]; 

 

I can import the in a mod file or in the mission file by using this code 

 

{
    private ["_obj"];
    _obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
    if (_x select 4) then {
        _obj setDir (_x select 2);
        _obj setPos (_x select 1);
    } else {
        _obj setPosATL (_x select 1);
        _obj setVectorDirAndUp (_x select 3);
    };
} foreach _objs;

 

The thing is with eden it's working but we cannot edit objects ! I am sure it's possible because i have found a code to do it but cannot found it anymore, haven't touch arma 3 since 6 months. (and the version of Eden editor was the same..)

 

I know there is a way with create3DENEntity and set3DENAttribute.

 

If you can add something like this it will be awesome !!! (Sorry for my pretty bad english)

 

Cheers

 

 

 

 

Converting that type of array you posted there is definitely possible, but it's unnecessarily complex. Why would you export objects from Eden Editor with vectorDirUp when Eden Editor simply uses an array which defines the rotation around all 3 axis. 

 

You can check out 

 

or

 

 

Share this post


Link to post
Share on other sites

QVU946i.jpg

 

I extended the Variable Viewer to also support Locations, Groups and mission objects as well as the default namespaces

  • Like 7
  • Thanks 2

Share this post


Link to post
Share on other sites

I am currently working on a very simple single player respawn system.

 

Features:

- Variable respawn time

- Variable respawn tickets

- Variable damage threshold

- Respawn for AI units of player's group (can be disabled)
- Respawn on position of death, random respawn position or closest respawn position

 

The following video shows how it currently looks. The units spawn on their position of death, but that's configurable.

Please tell me what you think, features you'd like to see etc.

 

  • Like 6
  • Thanks 1

Share this post


Link to post
Share on other sites

Pretty cool.

 

Any chance of including a singleplayer revive system as well? 

Share this post


Link to post
Share on other sites
28 minutes ago, stburr91 said:

Pretty cool.

 

Any chance of including a singleplayer revive system as well? 

Might look into it, but no promises.

  • Like 1

Share this post


Link to post
Share on other sites

Great stuff! Would it be possible to select which individual AIs you want to respawn?

Share this post


Link to post
Share on other sites
8 hours ago, ayjay said:

Great stuff! Would it be possible to select which individual AIs you want to respawn?

I'll look into this. Thanks for the suggestion.

  • Thanks 1

Share this post


Link to post
Share on other sites

Here is a first crude version of the single player respawn script. If you have suggestions, optimisations or other feedback, let me know or directly edit the file.

 

https://github.com/R3voA3/3den-Enhanced/blob/master/3denEnhanced/fn_respawn.sqf

 

/*
   Author: R3vo
   Date: 2020-02-28
   Description:
   Used for the Single Player Respawn (SPR) attribute (WIP).
   Parameter(s):
   -
   Returns:
   BOOLEAN: true
*/

if (isMultiplayer) exitWith {false};

ENH_SPR_Markers_West = allMapMarkers select {"respawn_west" in _x};
ENH_SPR_Markers_East = allMapMarkers select {"respawn_east" in _x};
ENH_SPR_Markers_Guerilla = allMapMarkers select {"respawn_guerilla" in _x};
ENH_SPR_Markers_Civilian = allMapMarkers select {"respawn_civlian" in _x};
ENH_SPR_Time = 8;
ENH_SPR_RandomPos = false;
ENH_SPR_SpawnWhereDied = false;
ENH_SPR_Tickets = 3;
ENH_SPR_CanDie = true;

#define THRESHOLD 0.9
#define FADEOUT_TIME 3
#define FADEIN_TIME 8

ENH_SPR_fnc_respawn =
{
	params ["_unit"];
	if !(ENH_SPR_SpawnWhereDied) then
	{  
		private _sideID = (_unit getVariable ["ENH_SPR_OriginalSide",west]) call BIS_fnc_sideID;
		private _markerPool = [ENH_SPR_Markers_East,ENH_SPR_Markers_West,ENH_SPR_Markers_Guerilla,ENH_SPR_Markers_Civilian] select _sideID;
		if !(_markerPool isEqualTo []) then
		{
			private _respawnmarker = if (ENH_SPR_RandomPos) then
			{
				selectRandom _markerPool;
			}
			else
			{
				([_markerPool,[],{_unit distance getMarkerPos _x},"ASCEND"] call BIS_fnc_sortBy) select 0;
			};
			_unit setPos getMarkerPos _respawnmarker;
		};
	};
	_unit setUnconscious false;
	_unit allowDamage true;
	_unit setCaptive false;
	_unit setDamage 0;
	_unit setVariable ["ENH_SPR_Unconcious",false];
};

ENH_SPR_fnc_handleRespawnTimer =
{
	params ["_unit"];
	if (isPlayer _unit) then
	{
		private _respawnTime = time + ENH_SPR_Time;
		private _ctrlRespawnTimer = (call BIS_fnc_displayMission) ctrlCreate ["RscStructuredText",-1];

		_ctrlRespawnTimer ctrlSetPosition [0.25,0,0.5,0.06];
		_ctrlRespawnTimer ctrlSetBackgroundColor [0,0,0,0.1];
		_ctrlRespawnTimer ctrlCommit 0;

		//Fade out, disable sounds and player input
		0 cutText ["","BLACK OUT",FADEOUT_TIME];
		FADEOUT_TIME fadeMusic 0;
		FADEOUT_TIME fadeRadio 0;
		FADEOUT_TIME fadeSpeech 0;
		showChat false;
		disableUserInput true;

		while {time <= _respawnTime} do
		{
			_ctrlRespawnTimer ctrlSetStructuredText parseText format ["<t size='1.25' color='#218a36' align='center'>Respawn in %1 seconds.</t>",[(_respawnTime - time),"HH:MM"] call BIS_fnc_timeToString];
			sleep 0.1;
		};
		ctrlDelete _ctrlRespawnTimer;

		//Fade in, enable sounds and player input
		0 cutText ["","BLACK IN",FADEIN_TIME];
		FADEIN_TIME fadeMusic 1;
		FADEIN_TIME fadeRadio 1;
		FADEIN_TIME fadeSpeech 1;
		showChat true;
		disableUserInput false;
		[
			["Respawned"],
			[format ["GRID:%1",mapGridPosition _unit]],
			[
				format 
				["Tickets used: %1/%2",
				_unit getVariable ["ENH_SPR_UsedTickets",0],
				ENH_SPR_Tickets]
			]
		] spawn BIS_fnc_EXP_camp_SITREP;
	}
	else
	{
		sleep ENH_SPR_Time;
	};
	_unit call ENH_SPR_fnc_respawn;
};

{
	_x setVariable ["ENH_SPR_OriginalSide",side _x];
	_x addEventHandler ["handleDamage",
	{
		params ["_unit","","_damage","","","_hitIndex"];
		if (_unit getVariable ["ENH_SPR_Unconcious",false]) exitWith {0};

		//If tickets are used, let the unit die
		if (_unit getVariable ["ENH_SPR_UsedTickets",0] >= ENH_SPR_Tickets) exitWith
		{
			_unit removeEventHandler ["handleDamage",_thisEventHandler];
		};

		//If damage received to head, neck or face is greater 1, unit can die instantly.
		if (ENH_SPR_CanDie && {_hitIndex in [0,1,2] && _damage > 1}) exitWith {1};

		//Get new damage
		private _newDamage = if (_hitIndex >= 0) then
		{
			_damage - (_unit getHitIndex _hitIndex);
		} else 
		{
			_damage - damage _unit;
		};
		
		//If damage is greater than threshold, init respawn
		if (damage _unit + _newDamage >= THRESHOLD) then
		{
			_unit setVariable ["ENH_SPR_Unconcious",true];
			_unit allowDamage false;
			_unit setCaptive true;
			_unit setUnconscious true;
			private _usedTickets = _unit getVariable ["ENH_SPR_UsedTickets",0];
			_unit setVariable ["ENH_SPR_UsedTickets",_usedTickets + 1];
			_unit spawn ENH_SPR_fnc_handleRespawnTimer;
		};
	}];
} forEach allUnits;

true

 

  • Like 2

Share this post


Link to post
Share on other sites

 

  • Like 6
  • Thanks 4

Share this post


Link to post
Share on other sites

Looks awesome, it will be very handy.

 

Is there something you could do to automate adding unit markers to BIS_fnc_establishingShot so they show up during the shot?

Share this post


Link to post
Share on other sites

A huge thank you for this incredible mod. It saves me so much time and frustration. 

 

When a unit respawns, is it's equipment (including ammo) reset to what it was at the start or what it was at the time of death?

 

Also, will the unit's init line be run again with what the original unit had? Will original waypoints be restored as well?

 

I've seen those in other respawn scripts so I'm curious how this will be implemented. 

Share this post


Link to post
Share on other sites
11 hours ago, Joe K. said:

Looks awesome, it will be very handy.

 

Is there something you could do to automate adding unit markers to BIS_fnc_establishingShot so they show up during the shot?

I'll look into it, but not promises.

 

32 minutes ago, SterlingC said:

A huge thank you for this incredible mod. It saves me so much time and frustration. 

 

When a unit respawns, is it's equipment (including ammo) reset to what it was at the start or what it was at the time of death?

 

Also, will the unit's init line be run again with what the original unit had? Will original waypoints be restored as well?

 

I've seen those in other respawn scripts so I'm curious how this will be implemented. 

1. The equipment isn't touched at all

2. The init line won't be run again, technically, the unit doesn't respawn. I prevent it from dying and then move it to a respawn location.

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

New update has gone live!

 

v5.1

*added*

- Added Single Player Respawn

- Added debug option to skip time

- Added debug option to change time multiplier

- Added Variable Browser to debug options

 

*changed*

- Debug options are now using BIS_fnc_holdAction

- Updated icon for debug options and tweaked several values

- Lenght of "laser beams" indicating view and aiming direction was shortened

- Mission ending attribute control was using EDIT_W_WIDE instead of EDIT_W resulting in slightly incorrect positioning

- Disabled ENH_DoStop in multiplayer https://github.com/R3voA3/3den-Enhanced/issues/85

- Changed attribute conditions from condition && condition to condition && code for best performance

- Fixed an issue where Hold Action attribute settings would not be saved

- Fixed an issue which caused Ambient Flyby and Airdrop attribute to be added to the mission.sqm unintentionally

- Debug option Teleport now teleports the player to the position at the center of the action icon

- Mission Ending attribute was only counting units killed by a player

 

 

Download: 

http://www.armaholic.com/page.php?id=30461

https://1drv.ms/u/s!AvgETyKiA6bQjfsBqARlYi4dZH0V1Q?e=dVMdTa

 

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

Good Morning R3vo,

Per our Discord conversation I'll leave my suggestion here. The other night, we had a request on the Arma 3 Discord for information on how to randomise a waypoint based on probability. So, imagine 4 possible waypoints with a 25% chance to be assigned each. I'm aware of a hacky workaround, but it may be above the skill level of the average user, especially if multiple are needed. 

So, my suggestion is to implement a "probability of presence" type module (or similar), but for waypoints (similar to how it is done with triggers).

Thanks for taking the time to read this!

Share this post


Link to post
Share on other sites
1 hour ago, FallujahMedic -FM- said:

Good Morning R3vo,

Per our Discord conversation I'll leave my suggestion here. The other night, we had a request on the Arma 3 Discord for information on how to randomise a waypoint based on probability. So, imagine 4 possible waypoints with a 25% chance to be assigned each. I'm aware of a hacky workaround, but it may be above the skill level of the average user, especially if multiple are needed. 

So, my suggestion is to implement a "probability of presence" type module (or similar), but for waypoints (similar to how it is done with triggers).

Thanks for taking the time to read this!

 

Thanks for the suggestion. I've just tried to add an attribute to waypoints, but without success. For some reason custom attribute are ignored. I'll try to find a different solution.

 

 

 

Is that what you had in mind ? @FallujahMedic -FM-

 

  • Like 1

Share this post


Link to post
Share on other sites

Not exactly, but that is very helpful indeed!

I was thinking more in terms of a branching decision. For example, you come to a fork in the road, you can go left or you can go right, but its based on probability. If option A is Left and option B is Right, is there a way, using probability, to determine which path the user should take? 

  • Thanks 1

Share this post


Link to post
Share on other sites
6 hours ago, FallujahMedic -FM- said:

Not exactly, but that is very helpful indeed!

I was thinking more in terms of a branching decision. For example, you come to a fork in the road, you can go left or you can go right, but its based on probability. If option A is Left and option B is Right, is there a way, using probability, to determine which path the user should take? 

I'll see if I can figure something out.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×