-
Content Count
73 -
Joined
-
Last visited
-
Medals
Everything posted by rkemsley
-
scripting [SOLVED]Remove CuratorEditingArea when enemies nearby
rkemsley replied to rkemsley's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Solved it myself... Script below for anyone who wants to recreate. //init.sqf [] spawn { while { alive t1 } do { if ( { _x distance2D t1 < 50 and side _x == east } count allunits != 0 ) then { myCurator removeCuratorEditingArea 0; } else { myCurator addCuratorEditingArea [ 0, position t1, 50 ]; sleep 0.05; }; }; };- 1 reply
-
- arma 3
- removecuratoreditingarea
-
(and 5 more)
Tagged with:
-
scripting [SOLVED]Remove CuratorEditingArea when enemies nearby
rkemsley posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi all, I am currently making a map which requires a Curator Editing Area to follow the player around the map. I would like it so that if an enemy of the player enters the Curator Editing Area, the Curator Editing Area is disabled (to stop him spawning stuff on top of the enemy). I have managed to write a script which has the Curator Editing Area follow the player... //init.sqf [] spawn { while { alive t1 } do { myCurator addCuratorEditingArea [ 0, position t1, 50 ]; sleep 0.05; }; }; How this works is by creating a Curator Editing Area at the position of the player every 0.05 seconds. The interesting part is that you keep the ID of the Curator Editing Area, this means that it deletes the old Curator Editing Area when the new one is created. (Curator Editing Area ID being 0 in this case). The problem I have is temporarily disabling the creation of "new" Curator Editing Area 's while an enemy is within range. So I need to be able to temporarily disable the script (which I do not know how to do).- 1 reply
-
- arma 3
- removecuratoreditingarea
-
(and 5 more)
Tagged with:
-
scripting [SOLVED]Using MissionEventHandler "BuildingChanged"
rkemsley replied to rkemsley's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Oh, after some testing, this method does not work properly if you are pre damaging a map building which isn't damaged (if that makes sense??)... For example, using the ModuleEditTerrainObject_F module. It basically damages the building when the map loads up. So you need to name the initial (undamaged) building, then get a trigger to name it again when it gets "damaged" (basically destroying the initial building). It a strange method, but it does make sense.- 19 replies
-
- 2
-
- arma 3
- missioneventhandler
-
(and 2 more)
Tagged with:
-
scripting [SOLVED]Using MissionEventHandler "BuildingChanged"
rkemsley posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
How does one use the MissionEventHandler "BuildingChanged"? I'm currently trying to make it so that when a building is damaged (and changes into its partly damaged form) a trigger is activated and props inside the building are deleted. Unfortunately, I'm having real trouble getting the script to work. Please help!- 19 replies
-
- arma 3
- missioneventhandler
-
(and 2 more)
Tagged with:
-
scripting [SOLVED]Using MissionEventHandler "BuildingChanged"
rkemsley replied to rkemsley's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@ZaellixA Yes, of course! So, for simple buildings which only have a damaged state, then a ruined state, (e.g. Land_i_Stone_Shed_V1_F or Land_u_Addon_01_V1_F) you can use this method. (Probably a little ugly, but works consistently). For more complicated buildings, (e.g. Land_i_Stone_HouseSmall_V1_F or Land_i_House_Small_03_V1_F) you will have to use this method. (Similar to the first one, but with a few added stages). Could be tidied up somewhat, but it works consistently as a first draft. If you need any help understanding what is going on, feel free to ask :)- 19 replies
-
- 2
-
- arma 3
- missioneventhandler
-
(and 2 more)
Tagged with:
-
scripting [SOLVED]Using MissionEventHandler "BuildingChanged"
rkemsley replied to rkemsley's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Nope, managed to get it working.- 19 replies
-
- 2
-
- arma 3
- missioneventhandler
-
(and 2 more)
Tagged with:
-
scripting [SOLVED]Using MissionEventHandler "BuildingChanged"
rkemsley replied to rkemsley's topic in ARMA 3 - MISSION EDITING & SCRIPTING
For more complicated buildings I've been trying to write a script which will detect which Hitzone has been destroyed, then remove the objects accordingly. Basically, I'm trying to make it so that when one side of the building it will be detected using getHitPointDamage. So it will only activate if getHitPointDamage gives a 1. Here's my trigger, but I am struggling to write a piece of code which actually works. { !alive StoneHouseGrey1_1 } && { ( StoneHouseGrey1_1 getHitPointDamage "Dam_1" ) < 1 }; The theory should work, its just being able to put it down into a piece of code which actually works...- 19 replies
-
- arma 3
- missioneventhandler
-
(and 2 more)
Tagged with:
-
scripting [SOLVED]Using MissionEventHandler "BuildingChanged"
rkemsley replied to rkemsley's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ok, I found a really simple solution which requires only two triggers and a 100cm sphere Sphere_StoneShedGrey1_1 Init: StoneShedGrey1_1 = nearestObject [ this, "Land_i_Stone_Shed_V1_F" ]; Trigger_1_1StoneShedGrey1_1 Condition: !alive StoneShedGrey1_1; On Activation: StoneShedGrey1_2 = nearestObject [ Sphere_StoneShedGrey1_1, "Land_i_Stone_Shed_V1_dam_F" ]; { deleteVehicle _x } forEach (getMissionLayerEntities "StoneShedGrey1_1 - Part01" select 0); { _x hideObjectGlobal false } forEach (getMissionLayerEntities "StoneShedGrey1_1 - Part02" select 0); Trigger_1_2StoneShedGrey1_1 Condition: !alive StoneShedGrey1_2 On Activation: { deleteVehicle _x } forEach (getMissionLayerEntities "StoneShedGrey1_1 - Part01" select 0); { deleteVehicle _x } forEach (getMissionLayerEntities "StoneShedGrey1_1 - Part02" select 0); { _x hideObjectGlobal false } forEach (getMissionLayerEntities "StoneShedGrey1_1 - Part03" select 0); Seems to have work consistently so far. However, untested in multiplayer. Thank Eden Editor for its obscure tricks!!- 19 replies
-
- arma 3
- missioneventhandler
-
(and 2 more)
Tagged with:
-
scripting [SOLVED]Using MissionEventHandler "BuildingChanged"
rkemsley replied to rkemsley's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Tankbuster Its about 4 building in a small area on a hill (small FIA stockpile/camp). Two of the buildings have about 20 - 40 prop objects in. They are mostly simple objects, so they don't move. It follows very heavily the (style?) of the Laws of War campaign, which has a lot of props in the buildings to make it seem more lived in. I just delete all of the objects in the specific building when it changes its state (destroyed).- 19 replies
-
- arma 3
- missioneventhandler
-
(and 2 more)
Tagged with:
-
scripting [SOLVED]Using MissionEventHandler "BuildingChanged"
rkemsley replied to rkemsley's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Tankbuster I now realise what you mean. When the original building gets damage, it basically gets "deleted" and a new building is placed in its position with the damage/destroyed model. Obviously, that now means that the "new" building in its place is not called the same thing as the "deleted" building. I see now that you were showing me that I need to have a script which will name the "new" building which is now in the place of the "old" one.- 19 replies
-
- arma 3
- missioneventhandler
-
(and 2 more)
Tagged with:
-
scripting [SOLVED]Using MissionEventHandler "BuildingChanged"
rkemsley replied to rkemsley's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Tankbuster Ok, I've given it a go. I have used the Edit Terrain Object Module to name the building which has the objects inside, because it is a map building. The building has been named FIA_StoneShedGrey1_1 in the Object Variable Name section. What I do not understand is that you have two names for the same building. (e.g. _mybuilding and _buildingdamaged) I have tried creating a simple .sqf which will delete the named objects within the building... //destroyProp.sqf { deleteVehicle _x } forEach [ P1, P2, P3, P4, P5 ]; Then I added this line of code to the Object Init of FIA_StoneShedGrey1_1 addmissioneventhandler [ "BuildingChanged", { params [ "_o", "FIA_StoneShedGrey1_1" ]; call "destroyProp.sqf" } ]; This would just give me a "Local Variable in Global Space" error.- 19 replies
-
- arma 3
- missioneventhandler
-
(and 2 more)
Tagged with:
-
scripting [SOLVED]Using MissionEventHandler "BuildingChanged"
rkemsley replied to rkemsley's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Tankbuster So I was trying to follow the BuildingChanged Mission Event Handler Condition: addMissionEventHandler [ "BuildingChanged", { "FIA_StoneShedGrey1_1", <----------------------------- Here is where I get stuck, I don't understand how to use the addMissionEventHandler for BuildingChanged. (It shouldn't be a very complicated event) On Activation: { deleteVehicle _x } forEach [ Object1_1, Object1_2, Object1_3, Object1_4, Object1_5, Object1_6 ];- 19 replies
-
- arma 3
- missioneventhandler
-
(and 2 more)
Tagged with:
-
scripting [SOLVED]Using MissionEventHandler "BuildingChanged"
rkemsley replied to rkemsley's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Tankbuster I was describing what I want to happen. I was trying to add a condition to a trigger so that when the named building gets damaged and changes to the damaged building model, my trigger would fire. But yeah, couldn't get it to work.- 19 replies
-
- arma 3
- missioneventhandler
-
(and 2 more)
Tagged with:
-
scripting [SOLVED]Check Alive nearestObjects
rkemsley replied to rkemsley's topic in ARMA 3 - MISSION EDITING & SCRIPTING
[ this, "Load.", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_loaddevice_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_loaddevice_ca.paa", "_this distance _target < 3", "_caller distance _target < 3", {}, {}, { _this call { _ZamakTrans = nearestObjects [ _this select 0, [ "Truck_02_transport_base_F" ], 25 ] select { alive _x }; if ( count _ZamakTrans > 0 ) then { target = ( _ZamakTrans select 0 ); _lockIndexes = [ 2, 3, 4, 5, 6, 7 ]; { if ( ( _x select 2 ) in _lockIndexes ) then { moveOut ( _x select 0 ) }; } forEach fullCrew target; { target lockCargo [ _x, true ]; } forEach _lockIndexes; box attachTo [ target, [ 0, 0.25, -0.15 ] ]; box setVectorDirAndUp [ [ 1, 0, 0], [0, 0, 1 ] ]; }; } }, {}, [], 2, Nil, true, false ] remoteExec [ "BIS_fnc_holdActionAdd", 0, this ]; For anyone who is interested in recreating ^^- 3 replies
-
- arma 3
- nearestobjects
-
(and 2 more)
Tagged with:
-
scripting [SOLVED]Check Alive nearestObjects
rkemsley posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am currently trying to make it so that when a hold action is preformed on a crate, it will put the crate in the back of a non specific Zamak Truck. Currently, it will put the crate in the nearest Zamak Truck (destroyed or alive). I need it to only pick the closest alive Zamak Truck. I've tried loads of different methods, but I'm now quite stuck. Please help! This is my script so far, all working fine. [ this, "Load.", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_loaddevice_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_loaddevice_ca.paa", "_this distance _target < 3", "_caller distance _target < 3", {}, {}, { _this call { _ZamakTrans = nearestObjects [ _this select 0, [ "Truck_02_transport_base_F" ], 25 ]; if ( count _ZamakTrans > 0 ) then { target = ( _ZamakTrans select 0 ); _lockIndexes = [ 2, 3, 4, 5, 6, 7 ]; { if ( ( _x select 2 ) in _lockIndexes ) then { moveOut ( _x select 0 ) }; } forEach fullCrew target; { target lockCargo [ _x, true ]; } forEach _lockIndexes; box attachTo [ target, [ 0, 0.25, -0.15 ] ]; box setVectorDirAndUp [ [ 1, 0, 0], [0, 0, 1 ] ]; }; } }, {}, [], 2, Nil, true, false ] remoteExec [ "BIS_fnc_holdActionAdd", 0, this ]; What I need is to pick the closest alive Zamak Truck, not just the closest one. (any advice/criticism on my script will be greatly appreciated.)- 3 replies
-
- arma 3
- nearestobjects
-
(and 2 more)
Tagged with:
-
scripting [SOLVED]Ejecting Units from Certain Seats
rkemsley posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am currently trying to make it so that when a hold action is preformed on a crate, it will put the crate in the back of a non specific Zamak Truck. This would mean that the seats in the back of the truck would have to be locked and anyone sitting in the truck must be ejected from those seats. This is my script so far, all working fine. [ this, "Load.", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_loaddevice_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_loaddevice_ca.paa", "_this distance _target < 3", "_caller distance _target < 3", {}, {}, { _this call { _ZamakTrans = nearestObjects [ _this select 0, [ "Truck_02_transport_base_F" ], 25 ]; if (count _ZamakTrans > 0) then { target = _ZamakTrans select 0; { target lockCargo [ _x,true ] } forEach [ 2, 3, 4, 5, 6, 7 ]; box attachTo [ target, [ 0, 0.25, -0.15 ] ]; box setVectorDirAndUp [ [ 1, 0, 0], [0, 0, 1 ] ]; }; } }, {}, [], 2, Nil, true, false ] remoteExec [ "BIS_fnc_holdActionAdd", 0, this ]; All I need at the moment is to be able to eject people from the seats 2, 3 4, 5, 6 and 7. (any advice/criticism on my script will be greatly appreciated.) -
scripting [SOLVED]Ejecting Units from Certain Seats
rkemsley replied to rkemsley's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Sgt. Dennenboom Thank you very much! _ZamakTrans = nearestObjects [ _this select 0,["Truck_02_transport_base_F"],25]; if (count _ZamakTrans > 0) then { target = _ZamakTrans select 0; // Kick units from cargo slots and lock them _lockIndexes = [2,3,4,5,6,7]; {if ((_x select 2) in _lockIndexes) then {moveOut (_x select 0)};} forEach fullCrew target; {target lockCargo [_x,true];} forEach _lockIndexes // Attach box box attachTo [target,[0,0.25,-0.15]]; box setVectorDirAndUp [[1,0,0],[0,0,1]]; }; This was perfect! Just had to make one minor change to the code so it would work. [ this, "Load.", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_loaddevice_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_loaddevice_ca.paa", "_this distance _target < 3", "_caller distance _target < 3", {}, {}, { _this call { _ZamakTrans = nearestObjects [ _this select 0, [ "Truck_02_transport_base_F" ], 25 ]; if ( count _ZamakTrans > 0 ) then { target = _ZamakTrans select 0; _lockIndexes = [ 2, 3, 4, 5, 6, 7 ]; { if ( ( _x select 2 ) in _lockIndexes ) then { moveOut ( _x select 0 ) }; } forEach fullCrew target; { target lockCargo [ _x, true ]; } forEach _lockIndexes; box attachTo [ target, [ 0, 0.25, -0.15 ] ]; box setVectorDirAndUp [ [ 1, 0, 0], [0, 0, 1 ] ]; }; } }, {}, [], 2, Nil, true, false ] remoteExec [ "BIS_fnc_holdActionAdd", 0, this ]; ^^ For anyone who would like to replicate what I've done. If the Zeus player is sitting in the position which gets locked while in Zeus mode, he will not be kicked out of the vehicle. -
Just wondering when the Tac-Ops DLC missions files will be available to the people who have bought the DLC. For my own map creation, it would be nice to see how certain actions which are used in the Tac-Ops DLC were created. It was done for the LoW DLC which I found very useful. Thanks :)
-
[Release] Fleeing Civilians
rkemsley replied to phronk's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am really new to scripting. Is there a way to make it so that rather than flee to the nearest building. The Civs will flee to a random map marker out of a load which have been placed around the area. -
I am trying to put together a trigger which gives Zeus points every time a truck goes between two points on the map (Like a supply line). If one Zeus is playing as the OPFOR team, they must spawn a Tempest Ammo truck and tell it to Cycle between two points (Point A and Point B). If the truck is spawned at Point A, the Zeus must order it to go to Point B, once it reaches Point B it must then be ordered to turn around and go back to Point A before Zeus points are added to that team. The Zeus can have multiple trucks going back and forth to add up Zeus points more quickly. I have managed to work out how to make the triggers active when a certain Vehicle type has entered the trigger, but I am having trouble working out how to get the supply point triggers working properly.
-
- zeus
- eden editor
-
(and 4 more)
Tagged with:
-
I've now managed to get it working This is the code I'm using in my init.sqf [BLUFOR_Zeus_Module, ['ModuleRemoteControl_F',0, 'B_Soldier_SL_F',2, 'B_soldier_LAT_F',2.6, 'B_soldier_M_F',2, 'B_Soldier_TL_F',1.6, 'B_soldier_AR_F',2, 'B_Soldier_A_F',1.4, 'B_medic_F',2, 'B_Soldier_F',1, 'B_Soldier_GL_F',1.4, 'B_sniper_F',4, 'B_spotter_F',2, 'B_engineer_F',2.6, 'B_soldier_repair_F',2.4, 'B_soldier_exp_F',2.6, 'B_recon_TL_F',1.2, 'B_recon_medic_F',1.6, 'B_recon_LAT_F',2.2, 'B_recon_JTAC_F',2, 'B_recon_exp_F',2.2, 'B_recon_M_F',1.6, 'B_recon_F',0.6, 'B_Quadbike_01_F',3, 'B_MRAP_01_F',5, 'B_HMG_01_F',2, 'B_HMG_01_high_F',2, 'B_GMG_01_F',3, 'B_GMG_01_high_F',3]] call bis_fnc_curatorObjectRegisteredTable; This seems to do the trick (for anyone else who is still having problems)
-
Hide Certain Units from Zeus Operators in Zeus Menu
rkemsley replied to FrogMstr's topic in ARMA 3 - ZEUS
I'm still trying to work out where to put this. At the moment I cant see to get this to work. -
I am very new to scripting with Arma 3, and I am having trouble getting this to work (currently trying to test what you have done). It keeps coming up with an error when I load from the Eden Editor into a multiplayer game to test the map. This is what I put into my "init.sqf". [curatorObj,[ "Land_HBarrier_01_line_1_green_F", 0, "Land_HBarrier_01_wall_corridor_green_F", 0]] call BIS_fnc_curatorObjectRegisteredTable; It does not seem to like this at all. Just wondering what I am doing wrong.