Bart.Jan
Member-
Content Count
739 -
Joined
-
Last visited
-
Medals
Community Reputation
0 NeutralAbout Bart.Jan
-
Rank
Master Sergeant
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
I need help with the syntax for a script
Bart.Jan replied to madmedic's topic in OFP : MISSION EDITING & SCRIPTING
<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 -
When does trigger DeActivation go into effect?
Bart.Jan replied to theavonlady's topic in OFP : MISSION EDITING & SCRIPTING
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" -
Need some quick help..!!
Bart.Jan replied to -=BT=- Matty R's topic in OFP : MISSION EDITING & SCRIPTING
<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) -
Detect 2 units present in area
Bart.Jan replied to eisa01's topic in OFP : MISSION EDITING & SCRIPTING
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. -
Placing a variable in Stringtable.csv
Bart.Jan replied to theavonlady's topic in OFP : MISSION EDITING & SCRIPTING
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 ? -
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.
-
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
-
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:
-
Need help with a trigger
Bart.Jan replied to theavonlady's topic in OFP : MISSION EDITING & SCRIPTING
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 -
DXDLL 1.0 (not Geforce MX compatible)
Bart.Jan replied to kegetys's topic in ADDONS & MODS: COMPLETE
I have exactly the same problem. Radeon 8500 AIW; Catalyst 4.6; winXPpro sp1; OFP v.1.96 with no unofficial addons. -
Problems removing masterarray element
Bart.Jan replied to terox's topic in OFP : MISSION EDITING & SCRIPTING
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 -
Problems removing masterarray element
Bart.Jan replied to terox's topic in OFP : MISSION EDITING & SCRIPTING
 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"],[]] -
Problems removing masterarray element
Bart.Jan replied to terox's topic in OFP : MISSION EDITING & SCRIPTING
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 -
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
-
Trigger without airunits
Bart.Jan replied to PhilippRauch's topic in OFP : MISSION EDITING & SCRIPTING
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