Jump to content

Bart.Jan

Member
  • Content Count

    739
  • Joined

  • Last visited

  • Medals

Posts posted by Bart.Jan


  1. erm... yes... maybe... but... is it working?  rock.gif  ghostface.gif

    Yes, it is.

    Or you can try to make variable to be objNull in init.sqs<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">variable=objNulland then check condition<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">isNull variable

    So you can have boolean with 3 values:

    1)true, 2)false, 3)objNull or "scalar bool array string 0xfcffffef"


  2. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">!(alive ammo1) and !(alive ammo2) and !(alive ammo3)

    or

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">!(alive ammo1 or alive ammo2 or alive ammo3)


  3. Instead of trigger use game-logic unit (named point).

    Then check condition:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player distance point < 50 and tank2 distance point < 50 and canMove tank2

    This replaces circular trigger with 50,50 axis (for land units only).

    You can check this condition in some trigger or in some script.


  4. What's missing? rock.gif  sad_o.gif

    Here's the whole stringtable.csv:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Language,English

    msg1,"Approaching %1."

    msg2,"%1 captured."

    msg3,"Retreating from %1."

    and then you can use<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">hint format[localize "msg1",town]

    player globalchat format[localize "msg1",town]tested

    Or do you want to use xxxRadio commad? If so, do you have radio messages defined in the description.ext ?


  5. How how do I make the mission so that it ends when obj's 1&2 are completed?

    In init.sqs:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">obj1=false

    obj2=falseThen add<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">obj1=trueto the completion of obj1 and<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">obj2=trueto the completion of obj2

    and the condition of the ending trigger will be<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">obj1 and obj2


  6. Into init.sqs put<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">succes=true

    Change conditions of both triggers to<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this and succes

    and add<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">succes=falseinto both on activations fields.

    So trig1:

    Quote[/b] ]condition: This and succes

    On Activation: z1 setflagtexture "\flags\unitedkingdom.jpg";"1" ObjStatus "DONE"; succes=false

    On Deactivation:

    and trig2:

    Quote[/b] ]condition: This and succes

    On Activation: z1 setflagtexture "\flags\unitedkingdom.jpg";"1" ObjStatus "FAILED"; succes=false

    On Deactivation:


  7. I installed DxDLL and the "Reflections, trilinear filtering, sharpen user interface and handle printscreen key" functions are working great but I found that I had to completely disable the postprocessing or else the entire screen would double, the main part I could see would be a blurry ghost and the other part is expanded and moved to the far bottom right.  Here's a screenshot:

    http://home.earthlink.net/~asmodeus777/dxdll_bug.JPG

    Radeon 9200 SE 128 MB

    I have exactly the same problem.

    Radeon 8500 AIW; Catalyst 4.6; winXPpro sp1; OFP v.1.96 with no unofficial addons.


  8. T_D @ June 30 2004,16:35)]_i = 0

    _ma = [[1,2,3],[],["a","b","c"],["alpha"],[]]

    _ha = []

    _anz = count _ma

    #loop

    _a = _ma select _i

    ?(count _a >= 1):_ha = _ha + [_a]

    _i = _i + 1

    ?_i >= _anz : goto "next"

    goto "loop"

    #next

    _ma = _ha

    exit

    does exactly the same as my example:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_a=[[1,2,3],[],["a","b","c"],["alpha"],[]]

    _tmp=[]

    {if (count _x>0) then {_tmp=_tmp+[_x]}} foreach _a

    _a=+_tmp


  9. T_D @ June 30 2004,10:03)]What happens when you write this :

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

     rock.gif

    Nothing:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_a=[[1,2,3],[],["a","b","c"],["alpha"],[]]

    _a=_a-[]

    _a=_a-[[]]

    _a=_a-["alpha"]

    _a=_a-[["alpha"]]

    hint format["%1",_a]

    And the result is:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[[1,2,3],[],["a","b","c"],["alpha"],[]]


  10. I'm not sure I get it, so only brief:

    example: I have an array with the empty subarrays:

    _a=[[1,2,3],[],["a","b","c"],["alpha"],[]]

    and I want to change it to the array without the empty subarrays:

    _a=[[1,2,3],["a","b","c"],["alpha"]]

    If it's so, then I can use:

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

    {if (count _x>0) then {_tmp=_tmp+[_x]}} foreach _a

    _a=+_tmp

    tested


  11. There is no command for this afaik.

    You can use this function:

    init.sqs:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">nameIt={call loadFile "name.sqf"}

    nameit.sqf:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private ["_it","_nms","_b","_t"];

    _nms=["REDFRED","BLUEFRED","BLACKFRED","WHITEFRED"];

    _it=_this select 0;_i=count _nms;_b=true;

    while {_b and _i>0} do {_i=_i-1;_t=_nms select _i;

    call format [{if (%1==_it) then {_b=false}},_t]};

    if (_b) then {_t=""};

    _t

    You must put quoted names to _mns array. For example you name your jeep newjeep in the editor so you must put "NewJeep" into _nms.

    If the object is not in _nms then returned name is empty string "" .

    Usage:

    for example script name.sqs:

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

    _name=[_AJeep] call nameIt

    ?_name!="": titletext[format ["Name: %1", _name], "Plain down"]

    exit


  12. still, when the chopper lands, it will get the sector, but this is ok...

    You can use condition that counts only with land units:

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

    or with soldiers only:

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


  13. Suggestions?

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{alive _x} count (units terr1) + (units terr2) + (units terr3) == 0

    or not so reliable

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">count (units terr1) + (units terr2) + (units terr3) == 0tested


  14. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit fire ["kozliceballmuzzle","kozliceball"]

    and

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit fire ["kozliceshellmuzzle","kozliceshell"]tested

    Look to comref at event handler "fired" description and then look at fire command. When you combine it you can find how to make unit fire from (almost*) any weapon.

    *I don't know how to make AI fire from A-10's cannon


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

    ~3

    east5 move getmarkerpos "inf4move"

    [east5] exec "patrol.sqs"

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

    ;End of Soldiers and Beginning of Tanks

    ...

    Replace [east5] exec "patrol.sqs" with your own line that execute your patroling script.


  16. group name is p1

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

    s1 in h1 && s2 in h1 && s3 in h1 && s4 in h1 && s5 in h1 && s6 in h1

    Does anyone know of a shorter way than typing out each individual unit?  And what about two or more groups instead of just one?

    condition:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x in h1} count units p1 == {alive _x} count units p1

    and for two groups in one heli:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x in h1} count (units p1)+(units p2) == {alive _x} count (units p1)+(units p2)


  17. for one group: group (F2) leader of the group with the trigger and then change trigger activation

    for more groups: do not group it but change condition to:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"_x in thislist" count (units groupA)+(units gropuB) == "alive _x" count (units groupA)+(units groupB)

    tested


  18. sad_o.gif(     i m stil getting an error (div / 0)

    and if i remove the the ortmsg=-1   and the @ortmsg>-1

    it works in editor, but i get an scalar bol error in dedicatet server

    new mission file

    You have:

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

    ortmsg=["SaintPierre",...]

    @ortmsg>-1

    ...It must be:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#wait

    @ortmsg>-1

    ortmsg=["Saint Pierre",...]

    ...


  19. @isNull>-1  makes me an error, unvalid number null[#]

    Oops. It must be

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

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

    @ortmsg>-1

    ortmsg=["Saint Pierre","Morton","Provins","Lamentin","Monignac","Gravette","Meaux","Saint Phillippe"] select ortmsg

    cutText [format["Starting location: %1",ortmsg],"plain down"]

    ~2

    safezonemsg1 = true;PublicVariable "safezonemsg1"tested

×