I been getting a lot of requests from visitors & members of my Domi server, for a permanent waypoint to the base.
The I came up with the idea of adding a task with a waypoint to the base, but as I feared, it won't allow the game to finish once all of the main targets are solved. I think the solution is to add it as a child task to each new main target mission as child tasks auto complete once the parent task is solved.
The problem is I can't find where the main mission tasks are.
GVAR(task1) = player createSimpleTask ["obj1"];
GVAR(task1) setSimpleTaskDescription ["Waiting for orders...","Waiting for orders......","Waiting for
orders..."];
GVAR(task1a) = player createSimpleTask ["obj1"];
GVAR(task1a) setSimpleTaskDescription ["Use this as a Waypoint to base...","Waypoint to base...","UK
Air Base"];
GVAR(task1a) setSimpleTaskDestination (getMarkerPos "obj1");
GVAR(task1a) settaskstate "Created";
if (_current_target_index == -1) then {
GVAR(task1) settaskstate "Created";
} else {
GVAR(task1) settaskstate "Succeeded";
};
Anyone know how to do this?
Thanks
---------- Post added at 01:14 PM ---------- Previous post was at 12:44 PM ----------
Originally Posted by =101AD=Richard
How can I add more of Xenos ammoboxes around the map, say on a FOB. I was looking through his scripts and see he placed his with a marker but couldnt find how to add another.
I tried this too, but couldn't figure it out, I found a script that would do the same thing.
Make an ammo box on the editor, put the text below in the init line of your box (please note this box is for OA, BAF, PMC and won't work with Arma 2)
Code:
nul = this execVM "ammo.sqf";
create ammo.sqf (in spoiler below) & place it in your mission directory.
Spoiler:
/////////////////////////////////////////////////////
//
// OA/BAF/PMC Weapons Ammo Crate Fill Script.
//
// Called from an ammocrate's init field via:
// nul = this execVM "ammo.sqf";
//
/////////////////////////////////////////////////////
while {alive _this} do
{
// Remove the stock items from the crate
clearMagazineCargo _this;
clearWeaponCargo _this;
If you want the 'save layout' , 'clear layout' & 'Get Backpack' options for your ammo crate add the text below to the init field (I use domi 2.60m, this may not work with older versions)
Code:
this addAction[("<t color=""#F4C610"">" + ("Save Layout") + "</t>"),"x_client\x_savelayout.sqf"]; this addAction[("<t color=""#F4C610"">" + ("Clear Layout") + "</t>"),"x_client\x_clearlayout.sqf"]; this addAction[("<t color=""#F4C610"">" + ("Get Backpack") + "</t>"),"x_client\x_getbackpack.sqf"];
I tried this too, but couldn't figure it out, I found a script that would do the same thing.
This script doesn't do the same thing as the crates in Domina. All crates in Domina are clientside only, means, they are only created (with createVehicleLocal) on a client and do not exist on the server to avoid issues with crate content synchronization (beside making it easier to handle different weapon layouts for the ranked version and having less data to sync for JIP clients).
This script doesn't do the same thing as the crates in Domina.
All crates in Domina are clientside only, means, they are only created (with createVehicleLocal) on a client and do not exist on the server to avoid issues with crate content synchronization (beside making it easier to handle different weapon layouts for the ranked version and having less data to sync for JIP clients).
Xeno
My apologies Xeno, I didn't take this into account, would it be possible to associate the x_playerammobox.sqf with a second marker so it could spawn another crate?
P.S. Thank you for all of your hard work on Domi it's greatly appreciated.
*Edit* How about this?
Place an invisible helipad where you want the extra ammo crate to go, name it box1
x_client\x_playerammobox.sqf
Spoiler:
// by Xeno
#define THIS_FILE "x_playerammobox.sqf"
#include "x_setup.sqf"
private ["_box1","_box","_box_array"];
Box disappeared after respawn, add the lines in red to x_client\x_setupplayer to fix this.(the code is just before half way down in the original script)
Spoiler:
if ((_x select 1) != "" && GVAR(player_side) == (_x select 2)) then {[_x select 1, _box_pos,"ICON","ColorBlue",
depbo the mission, copy it to your missions (\ArmA 2 Other Profiles\name\missions\), open it with the editor and replace the playable units with the ones you want. Don't forget to make them playable again and keep their names.
depbo the mission, copy it to your missions (\ArmA 2 Other Profiles\name\missions\), open it with the editor and replace the playable units with the ones you want. Don't forget to make them playable again and keep their names.
depbo? what is this and how would I go about doing this....sorry for being such a n00b
So xeno is their a way to do it with your ammoboxs?
Had another idea on this, seems to work OK on a dedi server, haven't tested it with JIP though.
Place a marker anywhere in the editor called AMspawn then place an invisible helipad named hp1 where you want the ammo box to be.
Finally put the code below at the end of x_client\x_playerammobox.sqf
You may want to add the line _AM1 allowDamage false; although the crate will respawn it will be empty. Remember to comment out the backpack line if your not using the OA version.
Had another idea on this, seems to work OK on a dedi server, haven't tested it with JIP though.
Place a marker anywhere in the editor called AMspawn then place an invisible helipad named hp1 where you want the ammo box to be.
Finally put the code below at the end of x_client\x_playerammobox.sqf
You may want to add the line _AM1 allowDamage false; although the crate will respawn it will be empty. Remember to comment out the backpack line if your not using the OA version.
Hope this helps.
Thanx Ill have to try this out in the dedi, otherwise it works great in editor, Thank you