Jump to content

Bart.Jan

Member
  • Content Count

    739
  • Joined

  • Last visited

  • Medals

Everything posted by Bart.Jan

  1. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">count (crew vehicle - [driver vehicle, gunner vehicle, commander vehicle]) == 0
  2. 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"
  3. Bart.Jan

    Need some quick help..!!

    <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)
  4. 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.
  5. 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 ?
  6. Bart.Jan

    Simple challenge

    I'm sorry, but is the word succes spelt wrong? Should I type success into the trigger instead? Yes, it's spelt wrong. Â You can use even success. It's the name of variable (not the command) so it depends on you.
  7. Bart.Jan

    Simple challenge

    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
  8. Bart.Jan

    Simple challenge

    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: and trig2:
  9. Bart.Jan

    Need help with a trigger

    Try:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{(!(canmove _x) or !(canfire _x)) and "Man" counttype [_x] == 0} count thislist == (count thislit) - ("Man" counttype thislist)not tested
  10. Bart.Jan

    DXDLL 1.0 (not Geforce MX compatible)

    I have exactly the same problem. Radeon 8500 AIW; Catalyst 4.6; winXPpro sp1; OFP v.1.96 with no unofficial addons.
  11. 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
  12. Â 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"],[]]
  13. 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
  14. Bart.Jan

    Object custom name

    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
  15. Bart.Jan

    Trigger without airunits

    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
  16. Bart.Jan

    Count dead groups

    <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
  17. Bart.Jan

    Firing the kozlice

    <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
  18. Bart.Jan

    How to transfer variable

    You can save mission time before in-mission-outro and after that, right before debriefing, switch time back to saved value.
  19. <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.
  20. 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)
  21. Bart.Jan

    End trigger?

    Don't worry. Test it yourself.
  22. Bart.Jan

    End trigger?

    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
  23. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">call format ["%1Ready=false",_unitstring] And then you can use Unit1Ready (boolean global variable). tested
  24. Bart.Jan

    Getname??

    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",...] ...
  25. Bart.Jan

    Getname??

    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
×