silola 1086 Posted January 28, 2008 Hello, @Charliereddog: ---------------- For your plan use the config file DAC_Config_Events. In the Readme (page 34) is described how you can use these config file. There you must insert an entry in the Array _Events_Vehicle. Example: To use the config for the zones, you must give in the script call the number of the config: ["z1", [1,0,1,300,500], [], [], [1,1,20.10], [], [0,0,0.2]] exec "DAC\Scripts\DAC_Init_Zone.sqs"; Now this zone uses the event config 1. Then you need one more script which checks the Array "myArray". Example: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">sleep 1; missionCondition = false; waituntil {DAC_Basic_Value == 1}; while{!missionCondition} do { sleep 1; if(({getdammage _x == 1} count myArray) == count myArray}) then {missionCondition = true}; }; hintc "You have killed all shilkas"; Please, remember of initializing the Array "myArray": myArray = []; (init.sqf) Greeting Silola Share this post Link to post Share on other sites
Heatseeker 0 Posted January 28, 2008 ^^ Im a bit confused about the config_events section too. It checks conditions on each individual group, like if a group reaches a WP or if a group is not alive, etc. But can it be used to check if all groups generated in/by a Zone are dead? (all infantry groups and cars) . For example: If all enemy units are dead i could deactivate the zone, switch the status of objectives and activate another zone (3+ seconds after) . Share this post Link to post Share on other sites
silola 1086 Posted January 28, 2008 Hello, yes, this would be possible with it. I try to deliver a small example to you : You have 3 zones: z1,z2,z3 For every zone you need own global Array which you must initialize: UnitsFromZ1 = []; UnitsFromZ2 = []; UnitsFromZ3 = []; Every zone needs own Config event ( case 1:, case 2:, case 3: ) Example for config events No.1 ( case 1: ) These config event 1 ( case 1: ) provides for the fact, that all soldiers (incl. crew members from vehicles) stored in the Array "UnitsFromZ1". I have done the entry directly with all unit categories no matter whether these types are generated, or not. You do the same one for the other zones Z2 + Z3. You must create for it in each case a new Config number ( case 2: + case 3: ) and there edit the suitable entries: ["{UnitsFromZ2 = UnitsFromZ2 + [_x]} foreach units _group"] and ["{UnitsFromZ3 = UnitsFromZ3 + [_x]} foreach units _group] The next step is to load the suitable configs for each zone. Example: ["z1",[1,0,1,400,800],[5,3,50,8],[],[],[],[0,0,0,2]]exec "DAC\Scripts\DAC_Init_Zone.sqs" ["z2",[2,0,2,600,900],[8,2,80,8],[],[4,1,30,6],[],[0,0,0,2]]exec "DAC\Scripts\DAC_Init_Zone.sqs" ["z3",[3,0,3,800,500],[5,3,50,8],[3,2,25,15],[],[],[0,0,0,2]]exec "DAC\Scripts\DAC_Init_Zone.sqs" Now you only need to check the units in the respective Arrays whether they still alive. Example for zone "z1": if(({alive _x} count UnitsFromZ1) == 0) then {hint "All units from zone z1 are dead"}; I hope that my explanation was fairly clear (excused my bad English). Greeting Silola Share this post Link to post Share on other sites
Heatseeker 0 Posted January 28, 2008 Oh yes, thank you very much Silola . Share this post Link to post Share on other sites
HulkingUnicorn 0 Posted January 29, 2008 Silola, I edited the waypoint generation config and set the values for the camps to equal those for infantry - that seemed to do the trick Share this post Link to post Share on other sites
vengeance1 50 Posted January 29, 2008 Hello,@vengeance1 : ----------------- Quote[/b] ]Hi Silola,Didn't make a difference sorry! I have really tested the change. For me it runs like it should be. Please, check your marker settings over again. This picture shows that the units on side GUER are not indicated any more, after I have done the change. Only the waypoint marker are visible. Hello, Perhaps I am misunderstanding the use of this option: _setShowUnit = [0,0,1,0]; Players are GUER, I am trying to display ONLY the GUER icons for troops both AI and Players, no others or vehicles. The setting you have is the opposite of what I am trying to do. Sorry for the confusion. Vengeance Share this post Link to post Share on other sites
Heatseeker 0 Posted February 5, 2008 Hello,yes, this would be possible with it. I try to deliver a small example to you : You have 3 zones: z1,z2,z3 For every zone you need own global Array which you must initialize: UnitsFromZ1 = []; UnitsFromZ2 = []; UnitsFromZ3 = []; Every zone needs own Config event ( case 1:, case 2:, case 3: ) Example for config events No.1 ( case 1: ) http://img135.imageshack.us/img135/3724/configci0.jpg These config event 1 ( case 1: ) provides for the fact, that all soldiers (incl. crew members from vehicles) stored in the Array "UnitsFromZ1". I have done the entry directly with all unit categories no matter whether these types are generated, or not. You do the same one for the other zones Z2 + Z3. You must create for it in each case a new Config number ( case 2: + case 3: ) and there edit the suitable entries: ["{UnitsFromZ2 = UnitsFromZ2 + [_x]} foreach units _group"] and ["{UnitsFromZ3 = UnitsFromZ3 + [_x]} foreach units _group] The next step is to load the suitable configs for each zone. Example: ["z1",[1,0,1,400,800],[5,3,50,8],[],[],[],[0,0,0,2]]exec "DAC\Scripts\DAC_Init_Zone.sqs" ["z2",[2,0,2,600,900],[8,2,80,8],[],[4,1,30,6],[],[0,0,0,2]]exec "DAC\Scripts\DAC_Init_Zone.sqs" ["z3",[3,0,3,800,500],[5,3,50,8],[3,2,25,15],[],[],[0,0,0,2]]exec "DAC\Scripts\DAC_Init_Zone.sqs" Now you only need to check the units in the respective Arrays whether they still alive. Example for zone "z1": if(({alive _x} count UnitsFromZ1) == 0) then {hint "All units from zone z1 are dead"}; I hope that my explanation was fairly clear (excused my bad English). Greeting Silola Hmm.. i still have a few more doubts. What if i have a camp with 1 or 2 respawns available? I wasnt planning to use the camps initially but am considering using them now, since the units die and spawn back the above method wont work? Im going to deactivate the zone after the units die anyway so i might just live with it, but im posting incase you have thought about this already . Also, im thinking about placing my camp logic inside a barrack in one of the Sahrani bases so that the units spawn inside it, do you think this will be a problem? Is it possible to remove the fire and tent from _campBasic? I know the flag and logic are necessary but i dont need the other two objects. Thanks, im having great fun with DAC . Share this post Link to post Share on other sites
mazza 1 Posted February 5, 2008 How do you activate the script DAC_Show_Radio.sqf ? Share this post Link to post Share on other sites
dmarkwick 261 Posted February 5, 2008 How do you activate the script DAC_Show_Radio.sqf ? If you mean, how do you get the DAC radio messages up onscreen, the readme page 21 describes this. Basically it involves opening DAC_Config_Creator.sqf and changing the DAC_Com_Values array to display the things you'd like it to. In your case, if I got it right, you need to change the third parameter to 3 to enable all radio communications between all units to be displayed. As an example mine is set to: DAC_Com_Values = [1,2,3] Share this post Link to post Share on other sites
mazza 1 Posted February 5, 2008 Quote[/b] ]In your case, if I got it right, you need to change the third parameter to 3 to enable all radio communications between all units to be displayed. As an example mine is set to:DAC_Com_Values = [1,2,3] Thanks, was thinking it was more in game radio chatter. I checked the PDF, thanks again Share this post Link to post Share on other sites
Heatseeker 0 Posted February 5, 2008 I have way too many questions . Can the units only speak sounds using the DAC_sayArray in MP? I was thinking about using the DAC_Config_Events to have the group leader say something like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ]; _Events_Unit_s = [ [], [], [], ["leader _group say ""mandown"""], [], [] ]; This should still work in MP yes? Share this post Link to post Share on other sites
sickboy 13 Posted February 5, 2008 ... that would probably not work, because I believe the scripts run only on the server, and say is a local command, if you're using v1.09, this could be a solution: Initialize in init.sqf: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"HEAT_SAY" addPublicVariableEventHandler { _say = _this select 1; (_say select 0) say (_say select 1) }; then use in the eventhandler part: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ["HEAT_SAY = [leader _group,'mandown']; publicVariable 'HEAT_SAY' "], This would be insufficient in ingameHosting situation, as such you could use:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ["HEAT_SAY = [leader _group,'mandown']; publicVariable 'HEAT_SAY'; (leader _group) say 'mandown' "], Share this post Link to post Share on other sites
Heatseeker 0 Posted February 5, 2008 I dont get it SB... i've used SAY before and it always worked perfectly on units/objects (wich were not local) . For example i've used SAY once to make a radio play some music and it broadcasted correctly to all clients on a dedi. If im using SAY on some a.i. unit wich is server sided (not part of any player group) it should work. Have you tested this before? Share this post Link to post Share on other sites
sickboy 13 Posted February 5, 2008 I dont get it SB... i've used SAY before and it always worked perfectly on units/objects . For example i've used SAY once to make a radio play some music and it broadcasted correctly to all clients on a dedi. If im using SAY on a a.i. unit wich is server sided (not part of any player group) it should work. Have you tested this before? Yes mate, otherwise I would've written I wasn't sure. If, for example, you use the Say function inside a trigger (and the condition becomes true for all computers) or in a script running on all computers, then the say function is executed on all the computers, thats why you hear it on all of them. However, the DAC scripts only run on the server (that's something im 99,9% sure of, my memory is taunting me ). This means that the say command is only executed on the server, and as such, nobody hears Have a look at my MP EditorGuide (signature) if you're interested in more of that stuff Share this post Link to post Share on other sites
Heatseeker 0 Posted February 5, 2008 Well i'll believe in you then . edit: Page 12, zone activation/deactivation: <s>["z1",[1,<span style='color:blue'>0/1</span>,0,300,200],[15,2,10,15],[ ],[ ],[ ],[0,0,0,0]]exec "DAC\Scripts\DAC_Init_Zone.sqs" Doesnt work, the activation/deactivation method im using to test my zones is the trigger condition true or false. Also according to the manual the condition must be the same for all zones.</s> edit: It must have been my mistake... again... sorry, it works perfectly. <s>I would like to know if the DAC can generate static weapons without using the camps, so i can place some MG posts at some bases or roadblocks</s>. edit: nvm, camps are more than fine for the above . Share this post Link to post Share on other sites
charliereddog 9 Posted February 9, 2008 Then you need one more script which checks the Array "myArray".Example: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">sleep 1; missionCondition = false; waituntil {DAC_Basic_Value == 1}; while{!missionCondition} do { sleep 1; if(({getdammage _x == 1} count myArray) == count myArray}) then {missionCondition = true}; }; hintc "You have killed all shilkas"; Please, remember of initializing the Array "myArray": myArray = []; (init.sqf) Greeting Silola Thanks Silola, I get the first bit, where I've entered <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">["arrShilka=arrShilka + [_vehc]"], into the config_events file. I've set the trigger up to reference that config. Now, how do I do the following? Where do I put this, what script do I put it in Quote[/b] ]Then you need one more script which checks the Array "myArray".Example: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">sleep 1; missionCondition = false; waituntil {DAC_Basic_Value == 1}; while{!missionCondition} do { sleep 1; if(({getdammage _x == 1} count myArray) == count myArray}) then {missionCondition = true}; }; hintc "You have killed all shilkas"; Please, remember of initializing the Array "myArray": myArray = []; (init.sqf) Share this post Link to post Share on other sites
charliereddog 9 Posted February 9, 2008 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">["trgZone3",[2,1,0,80,80],[],[],[2,1,20,4],[],[0,0,0,0,0]]exec"DAC\Scripts\DAC_Init_Zone.sqs" Why won't this work? I'm placing the trigger in a small area of open ground. Share this post Link to post Share on other sites
Heatseeker 0 Posted February 9, 2008 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">["trgZone3",[2,1,0,80,80],[],[],[2,1,20,4],[],[0,0,0,0,0]]exec"DAC\Scripts\DAC_Init_Zone.sqs" Why won't this work? I'm placing the trigger in a small area of open ground. Page 12 of the manual, maybe.. ["trgZone3",[2,<span style='color:red'>1</span>,0,80,80],[],[],[2,1,20,4],[],[0,0,0,0,0]]exec"DAC\Scripts\DAC_Init_Zone.sqs" <span style='color:green'>0</span> Zone is active from the start. <span style='color:red'>1</span> Zone is inactive from the start. Your zone is not active? I have a problem too, i created a camp on a zone and the delete corpses feature stopped working . The strange thing is that the camp is local and in a zone that wasnt even activated... edit: I still havent found my problem . My zone call: Quote[/b] ]["z6",[6,0,6,1200,1100],[7,5,70,10],[4,3,20,5],[],<span style='color:green'>[1,1,55,1,100,2]</span>,[0,4,4,<span style='color:orange'>0</span>]exec "DAC\Scripts\DAC_Init_Zone.sqs" <span style='color:green'>-1 camp. -Units of groupsize 1. -55M patrol radius. -1 = camp spawns infantry. -100% probability of respawn. -2 respawns available.</span> And: Zone type case <span style='color:orange'>0</span> from DAC_config_camps. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> case 0: { _campBasic = ["FlagCarrierNorth",["HeliHEmpty",5,10,0],["HeliHEmpty",-5,10,0],["Logic",0,15,0],0]; _campAmmo = []; _campStatic = [["DSHKM",122,38,60,"SoldierEB"],["DSHKM",-34,66,290,"SoldierEB"]]; _campAddUnit = []; _campUserObj = []; _campRandomObj = []; _campWall = []; _campObjInit = [[],[],[],[],[],[],[]]; }; And from my DAC_Config_Creator: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">DAC_Delete_Value = [300,600] <s>If i remove the camp from the zone call (or just delete the zone trigger) the delete corpses feature works so there is a problem in my camp.. somewhere... but where?</s> . edit2: OK, it works after i removed: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this setcaptive true from the init of the unit im testing my zone with. Hopefully i wont have to edit this post again Share this post Link to post Share on other sites
charliereddog 9 Posted February 10, 2008 Indeed Heatseeker, that won't work. Neither will this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">["trgZone3",[2,0,0,80,80],[],[],[2,1,20,5],[],[0,0,0,0,0]]exec"DAC\Scripts\DAC_Init_Zone.sqs" The errant 1 was from me playing around with different things trying to get it to work. Share this post Link to post Share on other sites
Heatseeker 0 Posted February 10, 2008 Indeed Heatseeker, that won't work. Neither will this<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">["trgZone3",[2,0,0,80,80],[],[],[2,1,20,5],[],[0,0,0,0,0]]exec"DAC\Scripts\DAC_Init_Zone.sqs" The errant 1 was from me playing around with different things trying to get it to work. Maybe your zone is just too small for all the waypoints to be generated ? Share this post Link to post Share on other sites
charliereddog 9 Posted February 10, 2008 Problem solved. I needed to put in the condition, time>0. BY sheer coincidence, my script moves the triggers to game logic locations. Ergo, the original zone works fine, but the second doesn't because it wasn't moved to a logic so the condition of the trigger wasn't met. Apologies for my stupidity. I look forward to Silola explaining the other bits of my query regarding the array check script. Cheers for the help Heatseeker Share this post Link to post Share on other sites
quiet_man 8 Posted February 10, 2008 I look forward to Silola explaining the other bits of my query regarding the array check script. Cheers for the help Heatseeker I'm not Silola, but if you talk about your questions where the mission end check stuff has to go: This you put into an own script and just start it from init QuietMan Share this post Link to post Share on other sites
andersson 285 Posted February 11, 2008 Is there any translation somewhere of the russian soundfiles (all the r*.ogg) that I can use in DAC_SayArrayE? I like it, but I prefer to have the right soundfiles played in the right situation Thanks. Share this post Link to post Share on other sites
Heatseeker 0 Posted February 13, 2008 Hello,yes, this would be possible with it. I try to deliver a small example to you : You have 3 zones: z1,z2,z3 For every zone you need own global Array which you must initialize: UnitsFromZ1 = []; UnitsFromZ2 = []; UnitsFromZ3 = []; Every zone needs own Config event ( case 1:, case 2:, case 3: ) Example for config events No.1 ( case 1: ) [mg]http://img135.imageshack.us/img135/3724/configci0.jpg[/img] These config event 1 ( case 1: ) provides for the fact, that all soldiers (incl. crew members from vehicles) stored in the Array "UnitsFromZ1". I have done the entry directly with all unit categories no matter whether these types are generated, or not. You do the same one for the other zones Z2 + Z3. You must create for it in each case a new Config number ( case 2: + case 3: ) and there edit the suitable entries: ["{UnitsFromZ2 = UnitsFromZ2 + [_x]} foreach units _group"] and ["{UnitsFromZ3 = UnitsFromZ3 + [_x]} foreach units _group] The next step is to load the suitable configs for each zone. Example: ["z1",[1,0,1,400,800],[5,3,50,8],[],[],[],[0,0,0,2]]exec "DAC\Scripts\DAC_Init_Zone.sqs" ["z2",[2,0,2,600,900],[8,2,80,8],[],[4,1,30,6],[],[0,0,0,2]]exec "DAC\Scripts\DAC_Init_Zone.sqs" ["z3",[3,0,3,800,500],[5,3,50,8],[3,2,25,15],[],[],[0,0,0,2]]exec "DAC\Scripts\DAC_Init_Zone.sqs" Now you only need to check the units in the respective Arrays whether they still alive. Example for zone "z1": if(({alive _x} count UnitsFromZ1) == 0) then {hint "All units from zone z1 are dead"}; I hope that my explanation was fairly clear (excused my bad English). Greeting Silola Uh oh, the above did not seem to work . I added the array to my init file. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">UnitsFromZ1 = []; The zone call is: Quote[/b] ]["Z1",[1,0,<span style='color:red'>1</span>,700,800],[7,1,60,10],[],[],[ ],[0,0,1,0]]exec "DAC\Scripts\DAC_Init_Zone.sqs" <span style='color:red'>1</span> points to case 1 of DAC_Config_events: Quote[/b] ] case 1: { _Events_Unit_S = [ ["{UnitsFromZ1 = UnitsFromZ1 + [_x]} foreach units _group"], But the condition: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if(({alive _x} count UnitsFromZ1) == 0) activates regardless of the groups being dead or not. I ensured the units were present when i triggered the condition and i cant see what is wrong, can anyone? . Share this post Link to post Share on other sites