Jump to content

gigglebok

Community Member
  • Posts

    30
  • Joined

  • Last visited

  • Donations

    0.00 GBP 

Everything posted by gigglebok

  1. Thanks Stanhope, my wonderful clan member is about to have his Zeus revoked!
  2. Darn it, I never thought of writing them down. We'll probably be playing this week so I'll do the blindingly obvious then. In the meantime can you think of anywhere that this random spawning of AI squads would be happening - I couldn't see anything obvious unless it was a factory level - which this wasn't. edit: I'm sure at least one of them was a mechanised squad, but not all. I still have a suspicion it might be my clanmate arseing around with Zeus and then denying it, but I just wanted to make sure.
  3. Whilst playing a local copy of 3.3.50 with a clanmate the other day, I noticed that when we were close to clearing the main objective, randomly a new AI squad would often spawn right in front of us or very close to us. I've looked through the code but I can't see where this could be happening - unless my clanmate was taking the p*ss and zeusing them in. Can anybody give me any pointers in the code where I can stop this behaviour - obviously I'd expect reinforcements when it's a factory but this was a standard "take the place" main mission.
  4. Belt, brace, and extra braces. I keep finding edge conditions! if ( ( _wps < 2 ) || ( ( count _waypoint ) < _wps ) || isNil("_wps") || isNil("_waypoint") ) exitWith {debugLog "No waypoints calculated"; false}; // B0K
  5. Well, it all looks swimmingly good now (pardon the pun) Here it is in patch diff format, the two plusses seemed to do the trick. at least it fails gracefully without borking the machine now PS Thank you Stanhope and all the others for I&A, I'm your biggest fan, our small and sad clan idolise your program, it's all we play! $ diff -Naru ../../../AW_Invade__Annex_3_3_50.Altis/Functions/Units/fn_taskCircPatrol.sqf fn_taskCircPatrol.sqf --- ../../../AW_Invade__Annex_3_3_50.Altis/Functions/Units/fn_taskCircPatrol.sqf 2020-01-23 16:02:16.000000000 +0100 +++ fn_taskCircPatrol.sqf 2020-02-16 17:13:55.000575400 +0100 @@ -109,7 +109,7 @@ { _wps = 5; } else { _wps = count _newWp; }; - + if ( ( _wps < 2 ) || isNil("_wps") || isNil("_waypoint") ) exitWith {debugLog "No waypoints calculated"; false}; // B0K for "_w" from 1 to _wps do { private ["_dist", "_testWp"]; _dist = 0; @@ -133,6 +133,7 @@ }; }; }; +if ( isNil "_wp" || isNil "_waypoint" || ( count _waypoint ) < 6 ) exitWith {debugLog "No waypoints calculated at all"; false}; // B0K for "_w" from 1 to 6 do { if ( !(surfaceIsWater (_waypoint select _w)) && !((_waypoint select _w) isEqualTo [0,0]) ) exitWith
  6. Not the entire AO, but just the waypoints around the group leader, looking at the code, is that right? I need to find a way that it still works with fording/wading depth water, I guess. Not coming up with errors or glitches so far, but early days yet
  7. I am using a custom map, but I don't go anywhere near the mission folders, I just adjust AO definitions and the description. It's possible as I have some partially flooded towns (1-2m floods in places ) that it can't calculate a valid waypoint as this calculation seems to weight against sea, quite logically. But I think the possibility still exists (if you've noticed it too from time to time), so I'll try this defensive patch and see if that stops all the errors - there may be some edge cases in vanilla maps but maybe I'm getting it more on mine becuase of the environment? I'll report back after thrashing it today. By all means feel free drop it in the master code if it works, I guess it wouldn't hurt?
  8. If it errors, doesn't it stop that routine being used from then on? I see broken missions after this error, trying to set up a campaign for "any" with a coord of 0,0. I'm going to try adding a check on line 112 to see if _wps is zero, if it is, would an exitwith true do the trick?
  9. Could this happen if the _waypoint array doesn't hold values becuase it couldn't make a good one? I only get this error once every 20 or so missions, but I am using a custom map. Edit: I suspect if _wps is set to 0, the loop "for "_w" from 1 to _wps do" must make _wp negative on the second iteration. Should I just make the code safe by trapping a count of 0 for _newWp? 12:49:03 Bad conversion: array 12:49:03 Error in expression <estWp"]; _dist = 0; _testWp = _waypoint select (_w-1); if (!isNil "_testWp") the> 12:49:03 Error position: <select (_w-1); if (!isNil "_testWp") the> 12:49:03 Error Zero divisor 12:49:03 File functions\Units\fn_taskCircPatrol.sqf [AW_fnc_taskCircPatrol]..., line 116 12:49:03 Error in expression <estWp"]; _dist = 0; _testWp = _waypoint select (_w-1); if (!isNil "_testWp") the> 12:49:03 Error position: <select (_w-1); if (!isNil "_testWp") the> 12:49:03 Error Zero divisor 12:49:03 File functions\Units\fn_taskCircPatrol.sqf [AW_fnc_taskCircPatrol]..., line 116 12:49:03 Error in expression <estWp"]; _dist = 0; _testWp = _waypoint select (_w-1); if (!isNil "_testWp") the> 12:49:03 Error position: <select (_w-1); if (!isNil "_testWp") the> 12:49:03 Error Zero divisor 12:49:03 File functions\Units\fn_taskCircPatrol.sqf [AW_fnc_taskCircPatrol]..., line 116 12:49:03 Error in expression <6 do { if ( !(surfaceIsWater (_waypoint select _w)) && !((_waypoint select _w) i> 12:49:03 Error position: <select _w)) && !((_waypoint select _w) i> 12:49:03 Error Zero divisor 12:49:03 File functions\Units\fn_taskCircPatrol.sqf [AW_fnc_taskCircPatrol]..., line 138 12:49:03 Error in expression <6 do
  10. Yep, just slap this expression into a debug window when I&A is running. _flatpos = [getMarkerPos currentAO, 10, 2500, 10, 0, 0.1, 0, [[BaseArray, 800],[currentAO, 800]], [0,0,0]] call BIS_fnc_findSafePos;  See that bottom left corner? IDK why it's not logging it as an error, but it is definitely a type error caused by BaseArray. I think it's silently ignoring it tho. Change it to _flatpos = [getMarkerPos currentAO, 10, 2500, 10, 0, 0.1, 0, [[getMarkerPos currentAO, 800]], [0,0,0]] call BIS_fnc_findSafePos;  And it works. I re-implemented the "loop" in all cases and no error messages. I also got a real error in the server log from fn_smenenemyeastintel, line 48: _randomPos = [(getPos _intelObj), 10, (300), 5, 0, 0.3, 0, [], _intelObj] call BIS_fnc_findSafePos; It's a type problem that again doesn't error directly, but causes the next line to fail with _randomPos not initialized. Fix was to give it the co-ord as above. _randomPos = [(getPos _intelObj), 10, (300), 5, 0, 0.3, 0, [], getPos _intelObj] call BIS_fnc_findSafePos; The problem in both cases (but different arguments) is that findSafePos expects a co-ord array, not a name. Hope that helps someone, I'm sure now it will show itself at some point on the server. I love I&A, so does my clan, and I want it to be around for ever!
  11. The more I look at this, the more I am sure that fleeting error message I saw was telling me something ain't right with a lot of other modules too. [BIS_fnc_position] Error: size 6, expected 3, in ["respawn_west","FOB_Martian","FOB_Marathon","FOB_Guardian","FOB_Last_Stand","USS_Freedom"] Looking at the code, I'm going to try retro-adding back in the loop which checks for all the bases - that blacklist argument if used in findSafePos needs to be in the format [center, dist] for each element - it's being passed an array of basenames, not positions. [[BaseArray, 800],[currentAO,800] Haven't had a chance to test, but going to hack the code on my version now. In addition, somebody might want to remove those three "<<<" at the beginning of FreeCivs.sqf as it's borking the compiler ! Please let me know if any of you made any progress, EU1 still seems to have the same codebase as the other day (with a few references to 3.3.8 in it still)
  12. Ha ha, I thought I'd seen your name more over the source than Ryko's! I think I'm onto something.. good luck with your presentation!
  13. I think the problem you're seeing TheScar (having snaffled the code from EU1 to look at) is something that's not appearing in the rpt logs, but appears as a brief message in editor mode when running locally, this is it: [BIS_fnc_position] Error: size 6, expected 3, in ["respawn_west","FOB_Martian","FOB_Marathon","FOB_Guardian","FOB_Last_Stand","USS_Freedom"] No line number or file reference! What I'm suspecting is it's expecting a coordinate (3 elements) and is getting BaseArray instead (6 elements). So any of the lines like this in the code Missions/Priority/priorityaa.sqf: _flatpos = [getMarkerPos currentAO, 10, 2500, 10, 0, 0.1, 0, [[BaseArray, 800],[currentAO, 800]], [0,0,0]] call BIS_fnc_findSafePos; Are looking suspect. I'm having a play locally to investigate further, TheScar, why don't you do the same and we'll try and get to the bottom of this. To say Ryko screwed up the editing is a bit unfair; BIS sprang this non-backwards compatible function change out of the blue and it's screwed I&A which uses it for everything. Ryko did a quick hack to stop everyone moaning; well, at least he was trying to.
  14. Ryko, could you give a worked example of the change to the code with one of the 79? Just stumbled across this on my server (that's running a local fork with a custom world on it, which I will release one day when it's ready!) - is it just as simple as substituting BIS_fnc_randomPos to BIS_fnc_findSafePos or are there some "gotchas"? Simple as this? _randomPos = [_AOpos, 0, _radiusSize, 0 ] call BIS_fnc_findSafePos; //_randomPos = [[[_AOpos, _radiusSize], []], ["water", "out"]] call BIS_fnc_randomPos;
  15. No worries! We're all here to learn off each other - I could see some good possibilities for it too - like concatenating a dynamic reference to objects in a loop. I thought it might have helped me extract the initial "init" from the original object too but once I got the above working I was a happy I&A bunny Thanks for explaining something that I really couldn't find a reference to anywhere in the BIS docs - it goes on about strings, arrays, objects, positions but nowhere did I find out that simply using the editor name as a variable makes it the same object. Guess my 40 years of coding count against me for that!
  16. OMG! So simple, I missed it. Thanks Ryko! I assumed I had to use a string of the label and never realised BIS made it easy for us!
  17. No - but I couldn't find any easy function to do type conversion from "string" - i.e. my landing pad object name in quotes - to "object" - which is what distance expects - other than converting it into an object from namespace. Just shoving it in like ( _vehicle distance "GH_1" ) fails with a type error telling me I can't mix array with string. I looked around for a type conversion from string to object and found the above using missionNamespace. I suspect from the above you're trying to tell me there's an easier method to do this but unfortunately, like I say, I'm a complete n00b at scripting so without showing me exactly how I should be rewriting it I'm not sure what you're getting at - to be clear, how should I reference an individual editor object in a distance calculation like everybody else apparently is doing on the planet (except me). Don't ask me any more questions highlighting my complete inability to script please - just post what I should be doing and be done with it!
  18. I've never done scripting before - but when I tried to use GetMarkerPos (It's a string, so GetPos wasn't having it, as that expects an Object) it reckoned it was 22km away from the object that it was sitting on. If there's a better way please do tell as I'm a complete n00b at scripting. This definitely worked but it did seem a little odd.
  19. Just for a handful - but it's ok, thanks to your pointers I have done a crash course in scripting and realised how far off the rails I was with the above. Using the jump pad crosses I was able to assign the correct attributes to the newly spawned vehicle that sat on that particular cross. So I've worked out in a roundabout way how to do what I wanted - by checking distance from newly spawned pawnee (used to be GH_1 - but vsetup02/vbasemonitor/bis respawn anonymises it) to corresponding jump pad cross that it sits on - "GH_1_pad". I've never done any serious ARMA scripting but I've been a coder for 40 years(!) so it didn't take long to get something going - if you can give me any pointers on improving it then please do - this might be useful to others, it certainly wasn't immediately obvious for example how to get the distance from a quoted name tag on an editor field to a spawned object. I'm just randomly throwing a colour on the other pawnees in the below. In doing so I've also answered the OP's question, so that made me feel quite good too
  20. What do you mean - just tick the box in the Eden editor? Won't that conflict with the I&A respawn routines - I have had issues trying that in the past where 50% of the time the object respawning detonates! Or do you mean disable the init code with vsetup02 in it?
  21. No worries Stanhope and good luck for your exam tomorrow. Back away from the forums! PS Am working on a proximity detection for the jumppad the heli is respawning on in vsetup02 . I think I'll get the result I'm after that way but it's a little convoluted.
  22. OK, beginning to piece this together (I think). I tried using private _name = name _vehicle; at the top of fn_vSetup02, after private _vehicle = _this select 0; and made a filter with an //===== littlebird digital skin if(_vehicleType in _humming) then { if ( _name == "GH_1" ) then { _vehicle addWeapon "CMFlareLauncher"; _vehicle addmagazine "300Rnd_CMFlare_Chaff_Magazine"; _vehicle addmagazine "300Rnd_CMFlare_Chaff_Magazine"; _vehicle setObjectTextureGlobal[0, '#(rgb,8,8,3)color(1,0,0,1)']; } else { _camo = selectRandom [ 'A3\Air_F\Heli_Light_01\Data\Heli_Light_01_ext_BLUFOR_CO.paa', 'A3\Air_F\Heli_Light_01\Data\Heli_Light_01_ext_ION_CO.paa', 'A3\Air_F\Heli_Light_01\Data\skins\Heli_Light_01_ext_wasp_co.paa', 'A3\Air_F\Heli_Light_01\Data\skins\heli_light_01_ext_digital_co.paa', 'A3\Air_F\Heli_Light_01\Data\skins\heli_light_01_ext_digital_co.paa' ]; _vehicle setObjectTextureGlobal[0, _camo]; } } but I'm guessing I'm too late to the party to do anything with that as it's referencing something that doesn't exist any more? GH_1 is the spawn name of the heli at base I'm trying to change to colour of in the above example - and it is an AH9 Pawnee in my changed version. I see there's a couple of createvehicles in fn_vBasemonitor.sqf. Am I right in thinking that this is where the actual respawn takes place, and is then handed over to vSetup02 - by which time it's too late to grab the original name? Would I be better off doing some checks in there instead - I can see references to the init property of the entity (_i) in vBasemonitor. Or am I on completely the wrong tree?
  23. Thanks for the super fast reply, Stanhope! Funnily enough, I'd just trawled through and found the fn_vsetup02 and was experimenting to see if it was overwriting the original entity - as I blew a heli up at base to check, your message came up! I get it now - I just need to extend the checks which at the moment group "_humming" (the AH-9 Pawnee) set in motion for them all. I guess there is no way of being able to interrogate the init params on the original (now destroyed) entity that could be checked on and potentially duplicated on the newly created vehicle? I can see the advantages of the script approach as it does lend itself to more complicated functions, I can see in the code substitution of loadouts and randomising of textures, which would be a pain to copy/paste into every init, so I definitely get your problem/advantage bit.
  24. At the risk of saying "me too" and/or generating too many forum posts, can I resurrect this thread and add "not just textures, but default loadouts I set in Eden Editor on base vehicles using init". I tried adding an addMPEventhandler set for MPRespawn but no dice - they are there on startup but on first respawn they're back to factory default settings. Looking at the code, I feel I need to add something into fn_vMonitor.sqf to inherit the init script values from the original mapped entity. Does that sound right? I'm not a guru at scripting but if someone could give me at least a pointer to the area I need to be in to get this working that would be really great - thanks!
  25. Can I ask all of you commenting on this thread to please make sure, if you haven't already, to add these observations and thoughts, and also vote up on BI's bug reporting system. It only takes a second to register and post, and your vote WILL make a difference to how quickly BI sorts this out. Thanks everybody and see you on a AW server sometime! http://feedback.arma3.com/view.php?id=11987
×
×
  • Create New...