Jump to content

silola

Member
  • Content Count

    1041
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by silola


  1. hi,

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Ok why doesnt this work.. although i get the hint pop up.. the units dont spawn..

    Its a DAC Activate thing..

    I discovered a wrong entry there ...

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">time < 1

    It should look however as follows ...

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">time > 1 wink_o.gif

    In addition please examine all zones for same attitudes.

    Besides the DAC zones should not be turned.

    Test the user-defined waypoints first with only one zone.

    That should function, or not?

    It can be only one little thing smile_o.gif

    And thanks all for the assistance at verde13 thumbs-up.gif

    bye

    silola


  2. hi smile_o.gif

    @MadRussian

    ---------------------

    It makes me happy that the solution functions with you. smile_o.gif

    Your suggestions are in any case very well. I will note the topic as the further feature.

    @ALL

    -------------

    Will it be worthwhile itself to finish the DAC Patch under all circumstances?

    I am not safe whether I get this Patch done in time confused_o.gif

    What will you do, if ArmA became released?

    Does OFP remain further a topic for you? Or is it then no longer interesting?

    Perhaps it is better to push the whole effort onto ArmA. I do not know it sad_o.gif

    Which happens, if a demo appears before?

    Then the interest is definitely strongly weakened.

    bye

    silola


  3. hi,

    thank you all again for the fine support and the unbroken interest in DAC thumbs-up.gif

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">It appears adding non-infantry is a bit more difficult to implement ... do you think we'll see this at some point in the future?

    That should not represent a large problem. Perhaps it is built additionally into the Patch :-)

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">First off, I understand that the DAC currently requires zones to be rectangular and oriented upright (at zero degrees), for technical reasons. However, given these constraints, it would be nice to be able to create zones with the waypoints in the shape of an oval. Seems it would be fairly simple to implement, by applying a trig function for ovals that checks distance from the zone center, when the waypoints are chosen (throwing out the ones which do not conform). So all the waypoints would still fall inside the bounds of the zone. I wonder if there’s anything I’m not thinking of here?

    In my opinion, a zone is not really necessary in the form of an oval.

    No serious advantage results from this conversion.

    There I know more meaningful features. whistle.gif

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Next, have you considered providing an option to disable using the group lead defined in the unit config for infantry groups, and instead pick the leader from the pool, on a case-bay-case basis? There are plenty of situations where one might want to randomize the group lead. Currently when using small group sizes (and the same unit config), you tend to keep seeing the same (leader) unit.

    Here a small tip, as you can reach the random selection for the Leader (like kutya it already said ):

    In the script “DAC\Scripts\DAC_Group_Soldier.sqs†you must replace the line 58 ...

    The original :

    ---------------------

    if(_groupside < 3) then {_leadertyp = _TempUnits select 2} else {_leadertyp = _TempUnits select (random ((count _TempUnits) - 1))}

    Modified :

    ---------------------

    if(_groupside < 3) then {_leadertyp = _TempUnits select (2 + random ((count _TempUnits) - 3))} else {_leadertyp = _TempUnits select (random ((count _TempUnits) - 1))}

    that's all. smile_o.gif

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">DAC currently has many useful error messages (hints) that pop up to let you know when things have gone awry, such as if a necessary dummy is missing. However, I don’t think there’s an error message for if any of the dummies are killed during initiation. I personally got stumped on this for a couple of hours the other night. (My east dummy was drowning in shallow water. :mock: ) In any event, that one might save a few users some frustration.

    I already built this inquiry into the Patch wink_o.gif

    Because I had the same problem also banghead.gif

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Also, about the issues surrounding not defining more than one DAC zone at the same point… I had been doing this for some time, and was not aware of the impact. Perhaps an error message to the user would be useful here as well?

    That is a good idea. That is also very important that each zone has another position.

    Because the sum of the coordinates is considered as clear identification to a zone.

    However a minimum deviation in the position is already enough.

    ok, I will insert such an inquiry. thx for the tip thumbs-up.gif

    This is the DAC AI nener.gif

    and this is silola pistols.gif

    this is my family confused_o.gif

    and this is our dog goodnight.gif

    bye

    silola


  4. hi,

    thx froggyluv smile_o.gif

    As promised, here a mini solution, in order to implement editor set units in DAC.

    Note please that this feature is made only for infantry groups.

    In order to use this feature, you need a script call and the appropriate script wink_o.gif

    The script call:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    [group,[zones],wpcount,side,behaviour_no,[options]]exec "DAC\Scripts\DAC_Insert_Group.sqs"

    Example: [grp1,[z1,z2],8,0,3,[1,1,1]]exec "DAC\Scripts\DAC_Insert_Group.sqs"

    [grp1,[z1,z2],8,0,3,[1,1,1]]exec "DAC\Scripts\DAC_Insert_Group.sqs"

    1. Parameter:

    -----------------------

    the name of the group

    [grp1,[z1,z2],8,0,3,[1,1,1]]exec "DAC\Scripts\DAC_Insert_Group.sqs"

    2. Parameter:

    ------------------------

    An array with valid zones, to be considered are with the waypoint selection.

    That can be only one zone, in addition, several zones.

    Master zones and also waypoint zones may be registered.

    [grp1,[z1,z2],8,0,3,[1,1,1]]exec "DAC\Scripts\DAC_Insert_Group.sqs"

    3. Parameter:

    ------------------------

    The number of waypoints, which the group may infer itself from the zones.

    [grp1,[z1,z2],8,0,3,[1,1,1]]exec "DAC\Scripts\DAC_Insert_Group.sqs"

    4. Parameter:

    ------------------------

    The side of the group.

    0 = east

    1 = west

    2 = resistance

    [grp1,[z1,z2],8,0,3,[1,1,1]]exec "DAC\Scripts\DAC_Insert_Group.sqs"

    5. Parameter:

    ------------------------

    A valid entry from the “DAC_Config_Behaviour.sqs†(a number)

    [grp1,[z1,z2],8,0,3,[1,1,1]]exec "DAC\Scripts\DAC_Insert_Group.sqs"

    6. Parameter:

    ------------------------

    The options are:

    1. # 0 = reduce group OFF | 1 = reduce group ON

    2. # 0 = delete units OFF | 1 = delete units ON

    3. # 0 = support other groups OFF | 1 = support other groups ON

    Here now the script (That comes to “DAC\Scriptsâ€):

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;--------------------------|

    ; Dynamic-AI-Creator |

    ;--------------------------|

    ; Script by Silola |

    ; 05 / 2005 |

    ; silola@mapfact.net |

    ;==========================|

    _group = _this select 0

    _zones = _this select 1

    _count = _this select 2

    _side = _this select 3

    _behav = _this select 4

    _options = _this select 5

    _wparray = [];_wptemp = [];_iw = 0;_id = 0;_dt = 4

    if((_options select 1) == 0) then {_dt = 9}

    @((getdir DAC_StartDummy) > 170)

    ~(0.1 + (random 1))

    #SelectAllWP

    ?(_iw >= count DAC_WP_Pool_S):goto "CheckCount"

    _entry = DAC_WP_Pool_S select _iw

    ?(count _entry == 2):_iw = _iw + 1;goto "SelectAllWP"

    ?(!((_entry select 0) in _zones)):_iw = _iw + 1;goto "SelectAllWP"

    _iw = _iw + 1

    #AddWPtoTemp

    ?(_iw >= count DAC_WP_Pool_S):goto "CheckCount"

    ?(count (DAC_WP_Pool_S select _iw) > 2):goto "SelectAllWP"

    _wptemp = _wptemp + [(DAC_WP_Pool_S select _iw)]

    _iw = _iw + 1

    goto "AddWPtoTemp"

    #CheckCount

    if(_count >= count _wptemp) then {_wparray = _wptemp;goto "SelectBehaviour"}

    #SelectRandomWP

    ?(count _wparray >= _count):goto "SelectBehaviour"

    _newwp = _wptemp select (random ((count _wptemp) - 1))

    "if((format[{%1},_newwp select 0]) == (format[{%1},_x select 0])) then {_id = _id + 1}" foreach _wparray

    ~0.01

    if(_id == 0) then {_wparray = _wparray + [_newwp];goto "SelectRandomWP"} else {_id = 0;goto "SelectRandomWP"}

    #SelectBehaviour

    ~(0.1 + (random 1))

    ?(count DAC_Init_Zone > 0):goto "SelectBehaviour"

    DAC_Init_Zone = DAC_Init_Zone + [_group]

    [_behav]exec "DAC\DAC_Config_Behaviour.sqs"

    ~0.3

    _groupbehav = DAC_KI_Behaviour

    DAC_All_Groups = DAC_All_Groups + [_group]

    ?(_side == 0):{DAC_East_Units = DAC_East_Units + [_x]} foreach units _group

    ?(_side == 1):{DAC_West_Units = DAC_West_Units + [_x]} foreach units _group

    ?(_side == 2):if(DAC_Res_Side == 0) then {{DAC_East_Units = DAC_East_Units + [_x]} foreach units _group} else {{DAC_West_Units = DAC_West_Units + [_x]} foreach units _group}

    [_group,_wparray,1,10,_groupbehav]exec "DAC\KI_1\DAC_Move_to_WP.sqs"

    ?((_options select 0) == 1):[_group,_side,1]exec "DAC\Scripts\DAC_Reduce_Group.sqs"

    ?((_options select 2) == 0):DAC_No_Support = DAC_No_Support + [_group]

    [_group,_dt,0,_side,[]]exec "DAC\KI_1\DAC_Waiting_for_End.sqs"

    ?(DAC_Marker):_m = DAC_UT1_Marker select 0;DAC_UT1_Marker = DAC_UT1_Marker - [_m];[_m,_group,1]exec "DAC\Scripts\DAC_Show_Group.sqs"

    ~0.1

    DAC_Init_Zone = DAC_Init_Zone - [_group]

    ?((DAC_Com_Values select 0) > 1):player groupChat format["%1 was inserted in DAC",_group]

    exit

    A marker and a DAC system message are shown, as soon as the group was merged.

    I hope that this solution is sufficient for one moment icon_rolleyes.gif

    Attention, is not 100% tested

    bye

    silola


  5. Hey MadRussian

    Thank you for your praise. That returns again motivation to me. smile_o.gif

    Your idea to implement editor set units in DAC later, I had already noted on my rough draft.

    I had however reset this feature, because nobody had asked up to now for it (You changed this now wink_o.gif).

    And in addition also for time reasons.

    But I think also that it could be very useful under certain circumstances.

    This evening I will try to build a small solution.

    In the first version only for infantry units...that's okay?

    Well, I announce myself, as soon as I can show something.

    And again thanks for your input thumbs-up.gif

    bye

    silola


  6. hi,

    thank you all for the encouraging words. thumbs-up.gif

    @kutya:

    ---------

    For what do you need this information?

    What exactly would you like to make thereby?

    Would you like to limit this feature only to the Players, or are the information to be stored to each unit?

    In order to determine, who killed a unit, you should use the EH “killedâ€. That is correct.

    The information could be stored in a global array. Each entry in the array contains the name and the number of killed units of the unit.

    Register the global array “DAC_Killer_Units†in the “DAC_Config_Creator.sqs†.

    The EH could be merged, where also the EH “hit†is loaded:

    {_x addeventhandler ["killed",{_this exec "DAC\KI_1\DAC_Killed_by_Enemy.sqs"}]} foreach units _group

    Then the script "DAC\KI_1\DAC_Killed_by_Enemy.sqs":

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_killer = _this select 0

    _check = 0

    _i = 0

    While {_i < count DAC_Killer_Units} do {_temp = DAC_Killer_Units select _i;if((_temp select 0) == _killer) then {_temp set[1,((_temp select 1) + 1)];_check = 1};_i = _i + 1}

    ~0.1

    ?(_check == 0):DAC_Killer_Units = DAC_Killer_Units + [[_killer,1]]

    exit

    Perhaps the example helps you a little bit. icon_rolleyes.gif

    bye

    silola


  7. hi,

    for the moment I must overcome a small motivation hole (already again). confused_o.gif

    Therefore the development progresses only slowly.

    I hope that I finished it, before AA becomes released crazy_o.gif

    Times the motivation is completely high, and then again completely down. That makes me crazy banghead.gif

    sorry and bye

    silola


  8. hi,

    I think that about 80% are finished.

    Unfortunately unexpected problems emerged.

    Thus the development runs at present somewhat slowly-acting. confused_o.gif

    Then the Readme must be still provided and some demonstrations.

    I would not have thought that the changes take so much time up.

    Sorry sad_o.gif

    bye

    silola


  9. hi,

    that sounds itself however in such a way, as if DAC is responsible for a Crash icon_rolleyes.gif

    But it is the whole of all Addons and scripts, which work with global variables. Correctly?

    It is naturally simple to say… the problem develops by DAC sad_o.gif

    @kutya:

    Now you know the reason, why I made for you the suggestion with the Logic and the waypoints wink_o.gif

    bye

    silola


  10. hi smile_o.gif

    The array “DAC_Players†is only for human players, or for AI units on your side.

    The array “DAC_Players†is assigned to the array “DAC_East_Units†or the array

    “DAC_West_Units†after the initialization. That depends on side of the player.

    A better solution would be to store the editor placed units directly in the correct array.

    Insert this code into the Init line of the Leader:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[group this]exec "DAC\Scripts\DAC_Add_Units.sqs"

    The script "DAC_Add_Units.sqs" looks then as follows:

    (Please save the script in the folder “DAC\Scriptsâ€.)

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    _group = _this select 0

    _side = side (units _group select 0)

    @(time > 2)

    ?(format["%1",_side] == "Civ"):exit

    ?(format["%1",_side] == "East"):{DAC_East_Units = DAC_East_Units + [_x]} foreach units _group

    ?(format["%1",_side] == "West"):{DAC_West_Units = DAC_West_Units + [_x]} foreach units _group

    ?(format["%1",_side] == "Guer"):if(DAC_Res_Side == 0) then {{DAC_East_Units = DAC_East_Units + [_x]} foreach units _group} else {{DAC_West_Units = DAC_West_Units + [_x]} foreach units _group}

    exit

    The arrays (“DAC_East_Units†+ “DAC_West_Unitsâ€) are settled automatic by invalid entries.

    The following Scripts are responsible for it: “DAC\KI_1\DAC_Select_E_Target.sqs†and “DAC\KI_1\DAC_Select_W_Target.sqsâ€.

    bye

    silola


  11. hi kutya smile_o.gif

    I could not test the mission yet extensively, but I have a small idea concerning the many global variables.

    This for example:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    GDC_MTNone = 100

    GDC_MTPatrol = 101

    GDC_MTAmbush = 102

    GDC_MTAttack = 103

    GDC_MTRaid = 104

    GDC_MTDefend = 105

    GDC_MTHeliDown = 106

    GDC_MTMercs = 107

    GDC_MTAssass = 108

    GDC_MTDemo = 109

    GDC_MTMIA = 110

    GDC_MTAmbConv = 111

    GDC_MTSupp = 112

    GDC_MTDefConv = 113

    GDC_AllowPatrol = 1

    GDC_AllowAmbush = 1

    GDC_AllowAttack = 1

    GDC_AllowRaid = 1

    GDC_AllowDefend = 1

    GDC_AllowHeliDown = 1

    GDC_AllowMercs = 1

    GDC_AllowAssass = 1

    GDC_AllowDemo = 1

    GDC_AllowMIA = 1

    GDC_AllowAmbConv = 1

    GDC_AllowSupp = 1

    GDC_AllowDefConv = 1

    GDC_AllowInser = true

    GDC_AllowExtra = true

    GDC_AllowMedevac = true

    GDC_AllowSmoke = true

    GDC_AllowSF = true

    GDC_AllowGround = true

    GDC_AllowAirStrike = true

    GDC_AllowAirSupp = true

    GDC_AllowArtillery = true

    GDC_UsedSmoke = true

    GDC_UsedSF = true

    GDC_UsedAirStrike = true

    GDC_UsedGround = true

    GDC_UsedAirSupp = true

    GDC_UsedMortar = true

    GDC_UsedArtillery = true

    GDC_MinDayTime = 5

    GDC_MaxDayTime = 19

    GDC_RestTime = 5

    GDC_HealTime = 1

    GDC_RearmTime = 0.5

    GDC_ResupplyDay = 3

    GDC_DaysSinceResupply = 0

    GDC_TroopDiedPen = 3

    GDC_EnemyDiedPen = -1

    GDC_CivDiedPen = 2

    GDC_CriticalDiedPen = 10

    GDC_MissDiedPen = 3

    GDC_SuppDiedPen = 3

    GDC_Value = 1000

    GDC_Support = 200 + random 75

    GDC_Success = 10

    GDC_ObjMarkDisp = 400

    GDC_MisCom = false

    GDC_MisFail = false

    GDC_UseNVG = true

    It concerns only variables, which contain either a numeric value, or true/false.

    The idea is that the values are stored in the coordinates of the waypoints from a logic unit.

    Each waypoint can store 2 different values.

    Normally your Vars was initialized e.g. in such a way:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    MyGameVar_0 = 100

    MyGameVar_1 = 150

    MyGameVar_2 = 200

    MyGameVar_3 = 250

    MyGameVar_4 = 300

    MyGameVar_5 = 350

    MyGameVar_6 = 400

    MyGameVar_7 = 450

    MyGameVar_8 = 500

    MyGameVar_9 = 550

    MyGameVar_10 = true

    MyGameVar_11 = true

    MyGameVar_12 = false

    MyGameVar_13 = false

    MyGameVar_14 = true

    MyGameVar_15 = false

    MyGameVar_16 = true

    MyGameVar_17 = true

    MyGameVar_18 = true

    MyGameVar_19 = false

    In the following example the variables, which are local now, are initialized:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    _MyGameVar_0 = 100

    _MyGameVar_1 = 150

    _MyGameVar_2 = 200

    _MyGameVar_3 = 250

    _MyGameVar_4 = 300

    _MyGameVar_5 = 350

    _MyGameVar_6 = 400

    _MyGameVar_7 = 450

    _MyGameVar_8 = 500

    _MyGameVar_9 = 550

    _MyGameVar_10 = true

    _MyGameVar_11 = true

    _MyGameVar_12 = false

    _MyGameVar_13 = false

    _MyGameVar_14 = true

    _MyGameVar_15 = false

    _MyGameVar_16 = true

    _MyGameVar_17 = true

    _MyGameVar_18 = true

    _MyGameVar_19 = false

    Now the waypoints of the logic unit are set according to the local variables:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    [MyGameLogic,1] setwppos [_MyGameVar_0,_MyGameVar_1]

    [MyGameLogic,2] setwppos [_MyGameVar_2,_MyGameVar_3]

    [MyGameLogic,3] setwppos [_MyGameVar_4,_MyGameVar_4]

    [MyGameLogic,4] setwppos [_MyGameVar_6,_MyGameVar_5]

    [MyGameLogic,5] setwppos [_MyGameVar_8,_MyGameVar_6]

    if(_MyGameVar_10) then {if(_MyGameVar_11) then {[MyGameLogic,6] setwppos [1,1]} else {[MyGameLogic,6] setwppos [1,0]}} else {if(_MyGameVar_11) then {[MyGameLogic,6] setwppos [0,1]} else {[MyGameLogic,6] setwppos [0,0]}}

    if(_MyGameVar_12) then {if(_MyGameVar_13) then {[MyGameLogic,7] setwppos [1,1]} else {[MyGameLogic,7] setwppos [1,0]}} else {if(_MyGameVar_13) then {[MyGameLogic,7] setwppos [0,1]} else {[MyGameLogic,7] setwppos [0,0]}}

    if(_MyGameVar_14) then {if(_MyGameVar_15) then {[MyGameLogic,8] setwppos [1,1]} else {[MyGameLogic,8] setwppos [1,0]}} else {if(_MyGameVar_15) then {[MyGameLogic,8] setwppos [0,1]} else {[MyGameLogic,8] setwppos [0,0]}}

    if(_MyGameVar_16) then {if(_MyGameVar_17) then {[MyGameLogic,9] setwppos [1,1]} else {[MyGameLogic,9] setwppos [1,0]}} else {if(_MyGameVar_17) then {[MyGameLogic,9] setwppos [0,1]} else {[MyGameLogic,9] setwppos [0,0]}}

    if(_MyGameVar_18) then {if(_MyGameVar_19) then {[MyGameLogic,10] setwppos [1,1]} else {[MyGameLogic,10] setwppos [1,0]}} else {if(_MyGameVar_19) then {[MyGameLogic,10] setwppos [0,1]} else {[MyGameLogic,10] setwppos [0,0]}}

    Here a small schematic pic:

    var2du5.jpg

    A further advantage could be that these values in MP Games are synchronized automatically.

    Here still a few examples, how the data can be manipulated:

    example: If you would like to query the value of “_MyGameVar_13â€, the inquiry would look as follows:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if(((getWPPos [MyGameLogic, 7]) select 1) == 1) then {hint "this var is true"} else {hint "this var is false"}

    example: If you would like to change the value of “_MyGameVar_9â€, then it would look in such a way:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_newValue = 100 + random 100

    [MyGameLogic,5] setwppos [((getWPPos [MyGameLogic, 5]) select 0),_newValue]

    Or you would like to increase the value of “_MyGameVar_2†by 1, then it would look in such a way:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_oldValue = ((getWPPos [MyGameLogic, 2]) select 0)

    [MyGameLogic,2] setwppos [(_oldValue + 1),((getWPPos [MyGameLogic, 2]) select 1)]

    Then a complete script that shows you all the values by a hint:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">@(time > 1)

    goto "SetLogicWPs"

    ;---------------------------------------------------------------------------

    #InitVars

    ;---------------------------------------------------------------------------

    ;Here the values are initialized

    ;---------------------------------------------------------------------------

    _MyGameVar_0 = 100

    _MyGameVar_1 = 150

    _MyGameVar_2 = 200

    _MyGameVar_3 = 250

    _MyGameVar_4 = 300

    _MyGameVar_5 = 350

    _MyGameVar_6 = 400

    _MyGameVar_7 = 450

    _MyGameVar_8 = 500

    _MyGameVar_9 = 550

    _MyGameVar_10 = true

    _MyGameVar_11 = true

    _MyGameVar_12 = false

    _MyGameVar_13 = false

    _MyGameVar_14 = true

    _MyGameVar_15 = false

    _MyGameVar_16 = true

    _MyGameVar_17 = true

    _MyGameVar_18 = true

    _MyGameVar_19 = false

    ;---------------------------------------------------------------------------

    #SetVarsToWP

    ;---------------------------------------------------------------------------

    ;The waypoints of the Logic are set, according to the values, on position

    ;---------------------------------------------------------------------------

    [MyGameLogic,1] setwppos [_MyGameVar_0,_MyGameVar_1]

    [MyGameLogic,2] setwppos [_MyGameVar_2,_MyGameVar_3]

    [MyGameLogic,3] setwppos [_MyGameVar_4,_MyGameVar_5]

    [MyGameLogic,4] setwppos [_MyGameVar_6,_MyGameVar_7]

    [MyGameLogic,5] setwppos [_MyGameVar_8,_MyGameVar_9]

    if(_MyGameVar_10) then {if(_MyGameVar_11) then {[MyGameLogic,6] setwppos [1,1]} else {[MyGameLogic,6] setwppos [1,0]}} else {if(_MyGameVar_11) then {[MyGameLogic,6] setwppos [0,1]} else {[MyGameLogic,6] setwppos [0,0]}}

    if(_MyGameVar_12) then {if(_MyGameVar_13) then {[MyGameLogic,7] setwppos [1,1]} else {[MyGameLogic,7] setwppos [1,0]}} else {if(_MyGameVar_13) then {[MyGameLogic,7] setwppos [0,1]} else {[MyGameLogic,7] setwppos [0,0]}}

    if(_MyGameVar_14) then {if(_MyGameVar_15) then {[MyGameLogic,8] setwppos [1,1]} else {[MyGameLogic,8] setwppos [1,0]}} else {if(_MyGameVar_15) then {[MyGameLogic,8] setwppos [0,1]} else {[MyGameLogic,8] setwppos [0,0]}}

    if(_MyGameVar_16) then {if(_MyGameVar_17) then {[MyGameLogic,9] setwppos [1,1]} else {[MyGameLogic,9] setwppos [1,0]}} else {if(_MyGameVar_17) then {[MyGameLogic,9] setwppos [0,1]} else {[MyGameLogic,9] setwppos [0,0]}}

    if(_MyGameVar_18) then {if(_MyGameVar_19) then {[MyGameLogic,10] setwppos [1,1]} else {[MyGameLogic,10] setwppos [1,0]}} else {if(_MyGameVar_19) then {[MyGameLogic,10] setwppos [0,1]} else {[MyGameLogic,10] setwppos [0,0]}}

    ;---------------------------------------------------------------------------

    #loop2

    ;---------------------------------------------------------------------------

    ;Here the values of the waypoints are read in and then written in a temporary array.

    ;Thats only to show the result.

    ;---------------------------------------------------------------------------

    _cwp = getwppos[MyGameLogic,_nextWPb]

    ?(_nextWPb > _count):goto "ShowResult"

    _VarArray = _VarArray + [(_cwp select 0),(_cwp select 1)]

    _nextWPb = _nextWPb + 1

    goto "loop2"

    ;---------------------------------------------------------------------------

    #ShowResult

    ;---------------------------------------------------------------------------

    _i = 0;_text = format["MyGameLogic Values:\n-----------------------"]

    while "_i < count _VarArray" do {_var = _VarArray select _i;_text = format["%1\nMyGameVar_%2 = %3",_text,_i,_var];_i = _i + 1}

    hint format["%1",_text]

    ;exit

    ~1

    _VarArray = []

    _nextWPb = 1

    goto "loop2"

    ;---------------------------------------------------------------------------

    #SetLogicWPs

    ;---------------------------------------------------------------------------

    ;All waypoints are set to the coordinates [-1,-1]

    ;---------------------------------------------------------------------------

    _nextWPa = 1;_nextWPb = 1;_count = 0;_VarArray = []

    #loop1

    _cwp = getwppos[MyGameLogic,_nextWPa]

    ?((_cwp select 0)+(_cwp select 1) == 0):goto "InitVars"

    _count = _count + 1

    [MyGameLogic,_nextWPa] setwppos [-1,-1]

    _nextWPa = _nextWPa + 1

    goto "loop1"

    var1jk5.jpg

    With this example instead of 20 global variables, only 1 Logic with 10 waypoints are used.

    Sorry for this big post m8 confused_o.gif

    bye

    silola


  12. hi Zendjir smile_o.gif

    Thank you that you found this error thumbs-up.gif

    That is really a stupid embarrassing error banghead.gif

    I do not know, why I inserted this "format" there. It functions also without this....

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?((((_zone select 0) + (_zone select 1)) == ((_tempcamp select 0) + (_tempcamp select 1))) && (_tempcount > 0)):if(_temptyp == 0) then {_temparray1 = _temparray1 + [_i];_temparray2 = _temparray2 + [_i]} else {if(_temptyp == 1) then {_temparray1 = _temparray1 + [_i]} else {_temparray2 = _temparray2 + [_i]}}

    You know my Scripts in the meantime better than I tounge2.gif

    bye

    silola


  13. hi smile_o.gif

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">I suppose this is for selecting a random element from an array. I studied this with some guys in an other thread here, and the conclusion was that the possibilities are not the same for all elements. The 1st and the last elements have half the possibility than the others.

    That is absolutely correct.

    But hey...DAC generates everything with each mission start against new.

    The whole waypoints, all units, the respective waypoints for each group etc.

    Nothing is like that as it was before. smile_o.gif

    To that extent this inaccuracy is not of great importance.

    If waypoint pool would never change and also if the groups would have always the same waypoints,

    that could be noticeable. But there is no remarkablenesses in such a way.

    Or do you have another opinion? icon_rolleyes.gif

    bye

    silola


  14. hi,

    @Mr.Burns:

    Normally this error arises, if units on the side “Resistance†become respawned.

    That is because of an incorrect IF query, in which a local variable is queried,

    which was not defined before.

    In addition, it is conceivable that it is connected with the Respawn type.

    You could try to use the standard attitude.

    If you do not generate vehicles, then is this value not of importance.

    You can therefore leave it on 0.

    [Z1,[1,0,0,150,150],[30],[],[],[],[0,1016,11]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

    [Z2,[1,0,0,160,120],[3,2,1,6],[],[],[1,2,30,0,30,5],[0,1016,11]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

    [Z3,[1,0,0,200,200],[4,4,1,6],[],[],[1,2,60,0,100,15],[0,1016,11]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

    In addition to test purposes use the standard Unit_Config.

    Only use it, to determine whether the error nevertheless comes.

    [Z1,[1,0,0,150,150],[30],[],[],[],[0,1016,11]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

    [Z2,[1,0,0,160,120],[3,2,1,6],[],[],[1,2,30,0,30,5],[0,0,11]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

    [Z3,[1,0,0,200,200],[4,4,1,6],[],[],[1,2,60,0,100,15],[0,0,11]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

    I hope that helps you. smile_o.gif

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Also after DAC has initialised it says something about 1 vehicle cached, although there is none..

    You can ignore this message. That is only an incorrect counter wink_o.gif

    bye

    silola


  15. hi sickboy smile_o.gif

    Do you have this difference directly at the beginning of the mission?

    Does it make a difference, if you deactivate the DAC AI (DAC_KI_Addon = 0)?

    Unfortunately I cannot recognize a script that regarding the number of players,

    on the server could prepare problems. icon_rolleyes.gif

    The server does not have to process also more Scripts, if correspond more player participate.

    Logical way the server has to process more data and processes, if several human players participate

    in the mission. As that affects itself exactly, I cannot judge unfortunately.

    Sorry m8, that I cannot offer a solution to you. confused_o.gif

    On our server DAC always made a good job....so far.

    bye

    silola


  16. hi,

    that looks something similar as my "DAC_Scan_Building_In_ZoneXY" script wink_o.gif

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_zone = _this select 0

    _xVal = _this select 1

    _yVal = _this select 2

    _temp = [];_g = 1

    _tPos = "logic" createvehicle [0,0,0]

    _stime = time + 5

    _tempB = []

    {if(!((_x select 0) == _zone)) then {_tempB = _tempB + [_x]}}foreach DAC_Buildings

    ~0.1

    DAC_Buildings = _tempB

    #objagain

    _checksb = 25

    _mpos = getpos _zone

    _pos = [(_mpos select 0) - _xVal,(_mpos select 1) - _yVal,0]

    ~0.2

    _old1 = (_pos select 1)

    _old2 = (_pos select 0)

    #searchnext

    _tPos setpos _pos

    _obj = nearestbuilding _tPos

    ?(_obj in _temp):goto "afterLoop"

    ?((getpos _obj select 0) < ((getpos _zone select 0) - _xVal)) || ((getpos _obj select 0) > ((getpos _zone select 0) + _xVal)):goto "afterLoop"

    ?((getpos _obj select 1) < ((getpos _zone select 1) - _yVal)) || ((getpos _obj select 1) > ((getpos _zone select 1) + _yVal)):goto "afterLoop"

    if(((_obj buildingpos 1) select 0) == 0) then {goto "afterLoop"} else {_g = 1}

    _m = "NULL"

    {if(getmarkerpos _x select 0 == 0) then {_m = _x}}foreach DAC_BLD_Marker

    ?(!(format["%1",_m] == "NULL")):_m setmarkerpos getpos _obj

    #loopPos

    if(((_obj buildingpos _g) select 0) == 0) then {DAC_Buildings = DAC_Buildings + [[_zone,_obj,_g - 1]];_temp = _temp + [_obj];goto "afterLoop"}

    _g = _g + 1

    goto "loopPos"

    #afterLoop

    _pos = [(_pos select 0),(_pos select 1) + _checksb]

    ?((_pos select 1) > (_old1 + (_yVal * 2))) && ((_pos select 0) > (_old2 + (_xVal * 2))):goto "result"

    ?((_pos select 1) > (_old1 + (_yVal * 2))):_pos = [(_pos select 0) + _checksb,(_pos select 1) - ((_yVal * 2) + _checksb),0.5]

    ?(time > _stime):_stime = time + 5;if((DAC_Com_Values select 0) && ((DAC_Com_Values select 3) == 1)) then {player groupChat format["DAC still searching for buildings in zone_%1",getpos _zone select 0]}

    goto "searchnext"

    #result

    deletevehicle _tPos

    if((DAC_Com_Values select 0) && ((DAC_Com_Values select 3) == 1)) then {player groupChat format["DAC found %1 Buildings in Zone_%2",count _temp,(_mpos select 0)]}

    exit

    bye

    silola


  17. hi,

    @Combat-Agent:

    Sorry....I had ignored your question confused_o.gif

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">I want activate Zones in sequences. First zone loads immediatly second zones loads 30 seconds laters, 3rd 60 seconds and so on. I couldnt figure out the activating deactivating section in the read me.

    Here a simple example....

    Assumed you would like to activate 5 zones (z1 to z5) successively. Then each zone must contain its own Activate value.

    At least one zone should be directly at the beginning active. That means this zone gets the Activate value 0

    That could look therefore in such a way:

    [z1,[1,0,0]......

    [z2,[2,11,0]......

    [z3,[3,22,0]......

    [z4,[4,33,0]......

    [z5,[5,44,0]......

    The size of the value is not determining thereby. Therefore it could look also in such a way:

    [z1,[1,0,0]......

    [z2,[2,1451,0]......

    [z3,[3,272,0]......

    [z4,[4,33765,0]......

    [z5,[5,9,0]......

    Important it is in your example only that there is different values , since each zone is to be activated separately.

    Well, now you need an external script that then the zones z2 to z5 activated (z1 is directly active).

    Here the simple script:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    ~1

    ;If 60 seconds passed since start of the mission

    @time > 60

    ;The zone with the Activate value 11 is activated

    DAC_Activate = 11

    ;If 120 seconds passed since start of the mission

    @time > 120

    ;The zone with the Activate value 22 is activated

    DAC_Activate = 22

    ;If 180 seconds passed since start of the mission

    @time > 180

    ;The zone with the Activate value 33 is activated

    DAC_Activate = 33

    ;If 240 seconds passed since start of the mission

    @time > 240

    ;The zone with the Activate value 44 is activated

    DAC_Activate = 44

    exit

    I hope that you could follow this example smile_o.gif

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Is it also possible to launch zones from a script?

    That is naturally also possible. You create the zones like always, only without the DAC script call and into the condition line you write ... this

    Then also an external script that starts the initialization of the zones (example):

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    ;[]exec „CallZones.sqs“

    @time > 1

    [z1,[1,0,0],[3,2,20,5],[ ],[ ],[ ],[0,0,0]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

    [z2,[1,0,0],[3,2,15,5],[ ],[2,1,25,12],[ ],[0,0,0]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

    [z3,[2,0,0],[ ],[ ],[3,1,5,8],[ ],[0,0,0]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

    [z4,[2,0,0],[ ],[ ],[25],[ ],[0,0,0]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

    [z5,[3,1,0],[ ],[ ],[3,1,20,8],[ ],[0,0,0]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

    [z6,[4,1,0],[ ],[ ],[ ],[1,2,50,0,100,10],[0,0,0]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

    .....

    exit

    That's all wink_o.gif

    @gunterlund:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">There have been so many discussions about mods in this thread that I cant keep up with what everyone is doing. Will the new patch be soon

    I know that m8 wink_o.gif but the Patch is very complex and all changes must be well considered icon_rolleyes.gif

    bye

    silola


  18. hi,

    @Combat-Agent:

    You generate units on side of the resistance...right?

    With this side DAC has problems crazy_o.gif

    Please try to generate the appropriate zones on side west or east (with the same units).

    Then these errors should not emerge any longer.

    In the next Patch this error is repaired. smile_o.gif

    bye

    silola

×