Member
Last active 6 years ago
@TheDragon117 Refer to my post here about how to setup ACEX Fortify and get it working with ALiVE persistence. I don't have a way of saving ACE trenches though.
Moved my code above over to a public GitHub Gist to keep the forum clean here since there was a lot of code.
Updated my post above to include the ammo crate ACE interaction script.
Here is easy way to make ammo crates persistent using ACE Logistics. This does not save the data in an ACE Logistics inventory, but it does save it's position and what is in the inventory of the ammo crate. To get around this, just make sure to take out the ammo crate and save it's position and data before restarting the server.
_action = ["ASO_Logistics_Update", "Save Position", "", { [ALiVE_SYS_LOGISTICS, "updateObject", [_target]] call ALiVE_fnc_logistics; hintSilent "Position saved!"; }, {true}] call ace_interact_menu_fnc_createAction; ["Reammobox_F", 0, ["ACE_MainActions"], _action, true] call ace_interact_menu_fnc_addActionToClass;
Adds an ACE interaction to the ammo crates that says... "Save Position". Above code should be ran on client at init, so initPlayerLocal.sqf
Using this function should work. Example below...
[{ params ["_unit", "_object", "_cost"]; private _return = (MHQ distance _unit) < 50; _return }] call acex_fortify_fnc_addDeployHandler;
This code will return true
if the player is within 50 meters of an object called "MHQ". Above code should be ran on client at init, so probably just place it in initPlayerLocal.sqf
@JD_Wang I think it would be pretty easy because IIRC there is a condition to check whether a player can fortify or not. I will look into it more when I get home because I actually want this kind of feature for my community. I have also updated my scripts above and will post the updates here.
To answer number 2, you need to be admin and able to open up the debug console to run code. There is no easy way to delete objects permanently, but through script you can.
You can delete an object by looking at it and running code below in your debug console...
[alive_sys_logistics,"removeObject", [cursorObject]] call ALiVE_fnc_logistics; deleteVehicle cursorObject;
This will remove the object from the database and delete the object as well. No other way I know of to delete objects and remove them from database, but I use this if people are starting to get crazy with building OPs/COPs/PBs, or stuff starts blowing up or glitches.
@SpyderBlack723 @Michel answer to number 1 is yes. I have been testing with it and have gotten it to work on my end through some scripting for a mission I have been working on for my community. As I stated in this GitHub issue about 6 months ago #106 , you can just stick code in your init.sqf to get it to work (view GitHub post for info). This works but the down side is that upon restart of the mission, the objects you placed down are not removable. I have hacked a way around this problem though.
I have setup the following to get ACEX Fortify to work with persistence, a custom ACEX Fortify preset, and a persistent ACEX Fortify budget.
Note: I have setup the ACEX Fortify budget to update so that when a side west unit kills opfor or resistance, it will give them more currency; and when a civilian is killed, currency is taken away. You can edit the code to your liking but this example gives you an advance configuration.
EDIT: Moved code over to public GitHub Gist.
@flibble666... @SpyderBlack723 's suggestion didn't work?
came here because I was mentioned but don't see my name?