Jump to content

terox

Member
  • Content Count

    2417
  • Joined

  • Last visited

  • Medals

Everything posted by terox

  1. terox

    Object placement problem

    if your mission param1 or param2 allows for selecting different terrain grids, then you can use that variable value to define the setpos locations for those specific items. eg if(param1 == 12.5)then{setTerraingrid 12.5;ObjectA setpos [getpos ObjectB select 0, getpos ObjectB select 1,3.2]}else{SetterainGrid 6.25; ObjectA setpos [getpos ObjectB select 0, getpos ObjectB select 1,3.7]} 3.2 and 3.7 being the height settings required for the differing set terraingrids you may find that you need to split the setteraingrid command and the object setpos command into different lines, to give the engine some time, eg 2 or 3 seconds, to remap the island prior to placement of the object
  2. Am trying to make a function to search a nested array with 1 sub level of a set structure I have a problem the function output is [-1,-1] it should be [2,0] the function only searches through the first sub array then exits with the following variable values _si = 3 _sn = 3 _i = 0 _n = 3 it never see's, or runs this line {If (_Si == _Sn)then{_I = _i + 1;_si = 0; _sn = count (_array select _i)} here is the debug format lines added to the function, that i used to ascertain what was happening <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> {If (_Si == _Sn)then{_i = _i + 1;_si = 0; _sn = count (_array select _i); player sidechat format ["Icounter _Si =%1 _Sn = %2 _i = %3 N= %4",_si,_sn,_i,_n]} else {_Si = _Si + 1; player sidechat format ["SIcounter _Si =%1 _Sn = %2 _i = %3 N= %4",_si,_sn,_i,_n]} <span style='color:red'>INIT.SQS</span> <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">tx_searcharray = preprocessFile "fSubarrayGetIndex.sqf" tx_array = [["a1","a2","a3"],["b1","b2","b3"],["c1","c2","c3"]] ~2 _e = ["c1",tx_array ]call tx_searcharray hint format ["%1",_e] <span style='color:red'>fSubarrayGetIndex.sqf</span> _Sn count of Sub array _Si index of sub array element <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> private ["_element", "_array", "_n", "_i", "_index", "_Sn", "_Si", "_Sindex"]; _element = _this select 0; _array = _this select 1; _n = count _array; _i = 0; _index = -1; _Sindex = -1; _Sn = count (_array select _i); _Si = 0; while "(_I < _n) && (_Si < _Sn)" do { if (_element == ((_array select _i) select _si))then{_Sindex = _Si; _Index = _i; _i=N;_Si =_Sn} else {If (_Si == _Sn)then{_I = _i + 1;_si = 0; _sn = count (_array select _i)} else {_Si = _Si + 1} }; }; _output = [_index,_Sindex]; player sidechat format ["%1",_output]; _output thx in advance for any help offered
  3. this thread turned into something else didnt it. Thx a lot for all the help and explanations guys, much appreciated Thanks for the recursive multi dimension search function. For my current needs, its not needed, however now that i have it, it will certainly be used for other projects.
  4. thanks a lot for your help folks advice greatly appreciated. As you can see, i'm no professional programmer, am in RL a gas fitter and only took up coding about 6 months after OFP was launched. So the standard i am at now, is all self taught any advice that improves my coding is warmly accepted I dont understand what you mean by "Recursive function"
  5. i've already tried various variations on that class weapons_west -------------------------------------------------------- class weapons { class west { ---------------------------------------------------------- class west { class weapons { none of them work thx for the effort anyway, but still havn't found a solution
  6. i am trying to return the number of units in a trigger area, including those in a vehicle however using <span style='color:blue'>(side countside list triggername)</span> does not count those units in a vehicle and <span style='color:blue'>((vehicle side) countside list triggername)</span> gives an error message what's the work around Thx in advance for any help offered
  7. Thx for all the help Special thanks to UNN, that worked a treat
  8. Dialog item subclass <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class uppertxt : RscText { idc = 9 x = 0.75; y = 0.1423; w = 0.133; h = 0.71319; style = ST_CENTER + ST_MULTI + ST_NO_RECT linespacing = 1 colorText[] = {0.250, 0, 0, 1}; colorBackground[] = {1, 0, 0, 0}; font = "TahomaB24" SizeEX = 0.025 text = "" }; eg <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _var1 = "hello" _var2 = "Goodbye" _example = format ["%1 this is on line 1\n%2 this is on line 2",_var1,_var2] ctrlset txt [9,_example] I basically want to place a frame around the text box while keeping the formatted string variable in multiline without adding "+64" to the style attribute, my text readout displays correctly eg Hello this is on line 1 Goodbye this is on line 2 however when i introduce the "64 style" the variable values are displayed correclty however i also see the "\n" and all the text is on 1 line eg hello this is on line 1 \n goodbye this is on line 2 any help would be greatly appreciated, thanks
  9. I created a beta script system, for what could have been a vehicle mechanic and recovery vehicle system for a mod I was working on I never developed further from the beta "Addaction" stage to the config "User action" stage However, to get away from the BIS instant repair truck You have a 1) Vehicle mechanic (this guy using an addaction system is able to slowly repair any vehicle that isnt totally destroyed If memory serves me correct, takes something like 20 minutes to fully repair something that was at 0.9 damage If you have 2 mechanics working on the vehicle, they repair it at double speed etc etc The mechanic would walk up to the target vehicle, assess the damage and report back, with an estimated time of repair He then dumps his weapons on the ground and loops through a series of animations until either the vehicle is repaired or certain "Break out of loop" conditions have occured 2) Recovery vehicle This has the ability to Winch an overturned target vehicle back onto its feet and recover it to within 10m of the recovery vehicle This i thought would make a much better system than the insta repair truck that BIS use This system was designed to be mp compatible, hence not using local setvelocity and minimising setpos during winching mission.sqm uses wgl classnames, if you dont want to download wgl, then simply edit the mission.sqm with bis classnames I was gonna try and get a toolbox model and specific recovery vehicle models made, this is the point at which i stopped developing Download the test mission here NB>>> This was a test beta for an idea, so dont expect optimised scripting, i just uploaded the system as i last left it Recovery system test mission
  10. terox

    Laptop + Flashpoint = good stuff?

    if u have the money, this can be reconfigured to a very expensive but nice machine http://www.rockdirect.com/rockshop/shophome.php?itemprcd=XTI-3.4 That'll do ya for Arma
  11. terox

    A Plea

    Couldnt agree with you more Cannon Fodder about the CQB ctf type missions OFP is in its twighlight years now and those who play regular OFP tend to play on a specific server where the community spirit and type of gameplay suits them. It seems to me that you have been hopping between the totally open, badly administered teenage bolt holes. OFP fortunately allows for such a wide range of missions and also fortunately, the teenager attitude "shiny weapon, g36 kill , counterstrike yeehaa roxxors attitude" stays at these open servers CTI has something to blame for this. Before that particulary mission type came on the scene, servers had good community spirits, folks queued up just to get a game on the more popular servers. Alas CTI with its 2 to 3 hour games, killed that spirit as less and less folks were willing to put up with the wait while 3 or 4 players struggled to the bitter end There are some excellent servers out there that have moved away from this style of mission play. I was once an avid PVP player and still like a decent C&H, not and never a ctf with its linear game pattern. I now play more and more coops, with a decent bunch of guys, a good community spirit and no idiotic teenagers to screw things up. If you havent yet played a proper FDF style Attack and defend mission, then you havent really played the creme de la creme of PVP missions. Spend time hopping on servers that arent playing these style of missions, download all the addons and sort out some mod folders, its worth it. The theory For every step you need to take to play on a server the less chance you will have of finding idiots on there playing
  12. terox

    CiA co-op night

    If a large scale PVP Stle COOP was to be arranged, then i strongly suggest it should be an A&D type mission Definition of a PVP coop (Player and AI) versus (Player and AI) combination Thats what OFP was made for, not CTF's etc !!!! Definition of a A&D ! team has to destroy or capture and objective, the other team has to defend against that attack You get limited to nil respawns depending wether group respawn is used Group respawn allows players to play for longer without increasing unit capacity on the map and is the preffered fun option Standard mission system. 1) Good detailed briefing - pre mission 2) Stealth move to objective by offence team where possible following "OC's" orders 3) Destruction or defence of objective before time limit expires 4) Good old bloated ego discussion in TS after merging both teams into same channel and then sweapping sides and doing a rematch Those of you that have only experienced CTF's and TDM's etc need to experience this and then you will be pleading with your League mission makers to make some of these missions Having a PVP clan background and playing COOP a lot I personally think it is the closest type of gameplay that suites both styles of gamer, albeit the PVP guy may not like sitting in spectate mode for the rest of the mission just because he got killed in the first 15 minutes But for creation of the ultimate ingame atmosphere i dont think you could beat it. I would strongly suggest amending kegs spectate script though to a first person view only system for such a mission, otherwise it would give too much away having a guy flying around as a seagul spying on the enemy or having a top down view. But yeah get it on!!!! open house all welcome and iof the mission was one known very well by a certain community, then it should defintely be mixed community v mixed community match, so as not to give any side an advantage The winner, well ofcourse anyone who enjoyed it !!!!
  13. terox

    CiA co-op night

    I cant be doing with "their  house is better than our house, my dads bigger than your dad" typical BIS forum discussion I am heavily biased towards zeus, its the only server i play on, my days of server hopping are over, it has the addons and the vr mates i like to be in the company of So what i have to say should be viewed with that bias in mind Add to that my age and senility setting in, take what i have to say with a pinch of salt I am 40, have a family and spend some of my time working at or playing OFP I have only been on the CIA server once, and that was for a joint cia-zeus coop night that was supposed to have been organised My recollections of that night are We turned up in quite large numbers Received no warm welcome Was left in the lobby for quite a considerable time (even though the number of players in the lobby was if memory serves, double that of those ingame) We had been invited but i felt that we were violating someones privacy and if i have to be honest were treat rather direspectfully The TS chat and atmosphere was more like being in a funeral parlour than an online game and when we finally got into the game i didnt enjoy it Now it could have just been a bad day for the CIA admins, who knows, we all have them But i left the server never wanting to return and thats a sad way to leave any server Obviously The guys at CIA must be doing something right or you wouldnt have been up and running for as long as you have Its unfair to comment on the way you play or create missions, every server is unique in that aspect and its basically that which draws a player to a server, but i cant help but to comment on the cold atmosphere i that i felt when i was on your server and if nothing else, maybe you should make a little more effort to be more friendly when newcomers arrive Thats just my own personal opinion, i try a place out once, if i dont like i dont return and being a pretty laid back guy if thats the way i feel about the CIA server then i am pretty certqain others must have the same opinion. Please dont view this as anything other than constructive criticism, it isnt intended as anything else and it isnt an actual dig at anything you do, its simply the feeling i had when i was there and as you guys can witness, i have never returned Just say Hi to folks who visit you and have a laugh, its a game not a job It's leisure not work and am sure that we at zeus aint perfect either and we have our own problems, waiting in the lobby too long between missions or trying to get someone sorted out with their mod folder or addons Anyway, keep playing OFP, thats what its all about, if everyone and every server was the same it would be pretty bloody tedious And am sure someone will come back with a cia v zeus argument, this post aint about that, its your server run it as you see fit and good luck
  14. terox

    Portable repair kit.

    lol just been pointed to this I have been developing a system for a private mod with this very much in mind You have a recovery vehicle driven by a repair mechanic 1) The recovery vehicles job is to overturn any vehicles that are on their side or back. Does this through a series of stages ...a) Targets a vehicle for recovery ...b) Connects the winch ...c) Winches in (using a series of setpos on a fast loop) for mp compatibility (sevelocity no good here) All actions run by the driver of the recovery vehicle 2) The vehicle mechanics job is to slowly repair any damaged vehicles It first assesses the damage, reports to the squad leader and then carries out a repair loop until ordered to quite or vehicle is fixed. The speed of the repair is 0.00071 per second loop it takes approx 22 minutes to fully repair something that is nigh on totally destroyed Basically it gives a parallel system option to the insta repair of the BIS truck, without the bug of ai not getting into a bis repaired vehicle due to the negligeable damage it sometime leaves it in I just need an M88 and a russian equivalent, who's up for some modelling
  15. terox

    The Iraq thread 4

    some fish will feed on any old crap and if moses hadnt shafted allah in the first place....
  16. terox

    The Iraq thread 4

    1)They are more than my fellow countrymen, many are ex colleagues 2) "Dude" i see as being a typicaly drugged up US college kid I fear i cannot aspire to such a standard and therefore i dont feel i deserve such a title 3) I do pay for petrol in pounds sterling, so really I DO REALLY REALLY pay for it 4) and been there done that got the T shirt I dont expect you to understand and i dont feel a requirement to teach you.
  17. terox

    The Iraq thread 4

    I dont really see the problem here 1) there were no weapons of mass destruction before the coalition forces went in, there will be some there now 2) Bush & Blair didnt do anything other than our normal expectations of  politicians 3) Some folks were killed, some folks werent 4) Petrol prices still went up 5) Oil  is still present in the middle east and therefore so are the US 6) Some folks were tortured, No biggy as this happens in every theatre of operations everyday somewhere in the world (The head chopping off thing, well thats a tad different) 7) Journalists did nothing other than what they normally do which is to create the news rather than report it 8) Retarded idiots add over 100 posts to a thread voicing opinions that nobody in power gives a rats ass for 9) and the next war will still occur in the middle east 10) Oh by the way, Muslims and Christians will continue to fight each other until they realise a) They worship the same god b) Their leaders are power crazed dickheads who probably shag each others wives and offspring c) There is not enough of them to still continue killing d) The oil has run out so what is it you are still debating?? Before folks state how important their opinions are ask yourself the question If you wear combat trousers are you wearing them because your are paid too or are you wearing them because you wanted to join the military But.........
  18. I want to be able to display different icons next to the players name in the mp setup screen once they select a unit on a side Specifically i mean the west USA flag icon East Russian Flag icon Resistance FIA flag icon that is placed next to your name when you select a side in the mp setup role i have searched the resource.bin file and the main config for the entries for them. The only entry i can find is cfgWorlds in the main config as you can see, i commented out the west BIS standard entry and tried to use the russian settings on west for testing purposes. However the us flag was still shown next to my player name when i ran a mod test mission, selecting side west. My conclusion, is that the entries for these icons is elsewhere, but i cant find threm Any help would be greatly apprciated
  19. thx for the input, however those red entries refer to the icon (face and background flag with west or east written on them), and is used for the display on the left hand side of the mp setup screen (which is green in colour) its the flag on the right hand side that is displayed next to your name that i am after, that's specific to a player, the left hand side isn't
  20. the file reference i am looking for is usflag_normal.paa rusflag_normal.paa fiaflag_normal.paa they are, thx to patton, in the misc pbo of the dta folder however i cant find any reference to them in either the resource bin or main config its the little flag icon, that is displayed next to your name when you select a player slot, that i am wanting to manipulate don't suppose you have an unbinarised version of the context.bin do ya, i can't get into it reason for wanting manipulation. & without giving too much info out I have 2 basic classes of soldier types that all other units are defined from (These are differing config values for various attributes) lets say for instance (and this is only for example clarification) that we have 1) US Rifleman of type class A = Blind obese 1 legged and deaf 2) US rifleman of type class B = fit as a fiddle but a pyscopath in their config entries i can use vehicleClass="Cripples"; vehicleClass="Lunatics"; This will allow the mission designer to differentiate the two classes when creating the mission displayName="US Rifleman cripple"; displayName="US Rifleman lunatic"; this attrbute is the info that is given when a unit passes on a contact report and the name of the unit type in the mp player selection screen My problem is, that i dont want the player, ingame to be able to differentiate between the US Rifleman Cripple and Lunatic without actually observing them for the finer differences in their uniforms and movements but i do need to differentiate between the unit classes when players select their playing slot. I figured out that a possible way to do this is. Have 2 west flags, one which defines a class A unit and one which defines a class B unit so basically a player selects a us rifleman in the mp selection screen, and then a us flag appears next to his name, and this us flag has a little A or B letter within it, thus the player knows what class type that unit is
  21. ok thx for the response
  22. is it possible to add an additional lines to a config entry so that i can query the attributes value in an ingame script. eg add the same line to all weapons entries etc eg say i want to check what calibre a magazine was and whether is belonged to Nato or warsaw pact this can easily be done with internal arrays withing the mod's scripts, however, if in the future we want to add a new weapon, we would have to update these arrays in the mod's internal scripts so i would prefer for future proofing, to attach certain attributes to either the weapon or its magazine, so that a script can check ?(tag_calibre == "556") ?(tag_side == "NATO") <span style='color:blue'>eg</span> is this possible, or can you offer an alternative solution Thanks in advance for any help offered
  23. Script counts the number of units that are seen by the trigger as side: west so thats everything. You could add playable units into a Player array and then query the array to execute a script [] exec "End.sqs"
  24. a trigger covering the entire playable area activated by the players side name "TX_Everyunit" Repeating Activated by West (or playable side) Condition: This and a script line to check how many units are alive on west would be #START ~5 {tx_Count= (Count alive _x)} ForEach list tx_Everyunit {tx_Cargo= (Count _x in choppername)} ForEach list tx_Everyunit ?(tx_count == tx_Cargo): goto "EXTRACT" goto "START" #EXTRACT do whatever is required here ******************************************* The line {tx_Cargo= (Count _x in choppername)} ForEach list tx_Everyunit maybe incorrect but that should give you the general idea
×