Godis_1
Member-
Content Count
207 -
Joined
-
Last visited
-
Medals
Everything posted by Godis_1
-
I still have problems with the new update of DISWS. Somehow the conversion system stops working when finishing a side mission which is generated by gathered intel from civilians. I am trying to fix it, but it's really hard as there are absolutely no errors shown in the logs... Anyone here who is experienced with SQF? Please refer to this thread:
-
DISWS doesn't work on dedicated servers! You need to play it via LAN, or direct connection via game browser. I guess that's the problem. Is 0.4.2.1 a new update? I don't know which one is the latest version, but I use it. On the other hand, it doesn't matter I guess, because I created 1.65 with prior version and the new version 1.70 (not released) runs with the latest version without any changes to factions. But remember, NO dedicated server. :)
-
Do you have all required dependencies of ISC mod? All RHS mods? Because this error in fact tells us that it cannot find the faction class of ISIS units. But what do you mean with "server" exactly? Starting a local host (LAN) for SP or are you trying to play it Coop on a dedicated server?
-
Dialog/Sidechat disappears (weird problem)
Godis_1 replied to Godis_1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
They're definitely passed, yes. But deleted? Do you mean the units or the conversations? If you're refering to the units, they're spawned dynamically via Engima's Civilians scripts, so they're getting deleted when player comes out of a defined range - or when they die. They spawn when players comes back into the range. But each spawned civilian is a new one, and my scripts and actions are attached to them via its "On-Callback" line (comparable to editor's unit init field). So each unit gets the conversation ability via "addaction", and in case a unit dies, all actions will be removed from it. Edit: I could show you the scripts, BUT they are about 15 scripts at all, but maybre it doesn't really help as absolutely no error is given anywhere. EDIT2: Oh, do you mean I should pass the units to the randomtask script (the one which generates the tasks dependent on the given intel) as arguments, even when the script deosn't need them? Actually in the post-task conversation script, the randomtask script is called and waits for it to be finished ( waitUntil (scriptdone _handle); ...), and then finishes and terminates itself. -
Dialog/Sidechat disappears (weird problem)
Godis_1 replied to Godis_1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
EDIT: I should have said, that there's not the sidechat command used, but globalchat and so on... now I understand you :) Nope, that's not the reason -
Dialog/Sidechat disappears (weird problem)
Godis_1 replied to Godis_1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for answering that fast! If that's the reason, whythe chat is shown all the time before I finish a mission? It will show up all the time, as long as I don't finish one of these missions. Before I thought is was caused by busy execVM, because I had many scripts executions via VM, from one script to the next, and so on, until it reaches my randomtask.sqf script, which defines the mission location, places a marker, mission objects and enemy units. I thought there was a script which wasn't terminated, and execVM might be too busy due to these many script executions via VM. So I made sure that any scope is really exited on given conditions, and each script will be terminated when the next one is being executed. I stored many scripts into functions and call them instead executing them via VM, but the problem remains... Now I don't understand your argument. No matter what group the civilians are belonging to, the chat is working - and stops working when finishing one of these missions which are generated by a script, executed during the conversation chat. Or I just don't get you right? I'm sorry, maybe you could explain it a little more detailed? Thx -
New PRE-RELEASE TESTVERSION coming today!! a whole new mission system introduced in this update! The whole civilian population is now involved in the scenario. Ask them for intel, or force them to give intel to you by searching their belongings, loot dead bodies, arrest suspects, face smarter suicide bombers who just wait for you to speak to them (only when your reputation is really bad!) and use that intel to accomplish new side missions based on maps, notes, pictures of HVTs, hunt down ISIS leaders, rescue hostages i.e. to increase your approval and reputation throughout the local population if necessary (when too many died, etc). All this is almost ready for release... today....today! ;-) EDIT: Well...Damn code, damn scripts! But almost done! Actually everything is working so far - except one thing! When I gather intel by any civilian, which leads to a side mission, e.g. weapons cache, after destryoing it, the dialog doesn't show up anymore when speaking to another civilian which was - I guess - related to busy execVM as I used it way too much within these scripts. The best solution should be to store some of these scripts into seperate functions and call them from parent scripts, while keeping track of those scripts which are executed by VM, so the parent script surely runs to its end and terminates, also should exit all running scopes to get rid of useless and performance hungry loops I've created in some cases. This should make sure to get a "clean" process, script restart when talking to civilian after finished a side mission. Well, I did that, and now - AGAIN - debugging all the time :-/ I wish I'd understand SQF a little better to speed things up!
-
[RELEASE] Engima's Traffic Script
Godis_1 replied to engima's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I will take a closer look into it. But I know for sure that this error wasn't shown before 1.68 update - OR it is related to one of my own scripts, but I cannot see any reference to that as I didn't change anything related to your traffic script. Anyways, let me try to find the reason before doing anything - unless you fix it before :) -
[RELEASE] Engima's Traffic Script
Godis_1 replied to engima's topic in ARMA 3 - MISSION EDITING & SCRIPTING
NP :) It was meant to Engima, so he can take care of it when updating - if he's planning to do so. But I can fix that too and throw the solution here then.. But will take some time as I have to fix my own project atm., -
[RELEASE] Engima's Traffic Script
Godis_1 replied to engima's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Since 1.68 it throws an error: 2:06:32 Error in expression <le "dre_scriptHandle"; if (!(scriptDone _scriptHandle)) then { terminate _script> 2:06:32 Error position: <_scriptHandle)) then { terminate _script> 2:06:32 Error Nicht definierte Variable in Ausdruck: _scripthandle // english: not defined variable in expression 2:06:32 File mpmissions\__cur_mp.Takistan\Engima\Traffic\Server\Functions.sqf, line 490 I checked it, but actually cannot figure what's the reason for this. BIS might have changed some sqf commands, but I haven't researched it yet. Just wanted to let you know :) I'm currently fixing all my own stuff which doesn't work since the update. BTW: The error isn't breaking the script. It still works, traffic is spawned arround the map like configured in call. -
Well, seems I am going to have another few hours of debugging those tons of code I've written over the last few days.. Yesterday I already started falling asleep right in my chair while typing LOL...
-
Randomly count & select a marker by script
Godis_1 replied to Godis_1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
BTW: You debug_console extension is a great one!! -
Randomly count & select a marker by script
Godis_1 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello everyone. I don't know how to desribe my problem in the title, my English isn't good enough on that.. I want let the script to randomly pick a marker. My problem is that the markers are being created dependant on the amount of towns on the map. It detects all towns and creates an invisible marker at each, with name "Mark_1", "Mark_2", etc... I need to know how can I let my script at first count all created markers (as each map has a different amount of villages) and then randomly pick one of these markers. The markers are being created as follows (a part of the script): towns.sqf /* Location finder for towns, villages and cities Places triggers and/or markers at these locations */ // Get each locations of villages or cities and create trigger/marker // Original script for finding locations by BrotherhoodOfHam // Final script by Godis if (!isServer) exitWith {}; //#define MARK #define OFFSET 0 _locations = (nearestLocations [[0,0,0], ["NameCity", "NameVillage", "NameCityCapital"], 40000]); { _xy = size _x; _trig = createTrigger ["EmptyDetector", position _x]; _trig setTriggerArea [ (_xy select 0) + OFFSET, (_xy select 1) + OFFSET, direction _x, false ]; _trig setTriggerActivation [ "WEST", "PRESENT", true ]; _trig setTriggerStatements [ "this", "hint 'Entered Village: Watch out in this area';", "hint 'Leaving Village...';" ]; //#ifdef MARK _mkr = createMarker [format ["Mark_%1", _forEachIndex], position _x]; _mkr setMarkerShape "ELLIPSE"; _mkr setMarkerAlpha 0.0; _mkr setMarkerSize [ (_xy select 0) + OFFSET, (_xy select 1) + OFFSET ]; //#endif } forEach _locations; // Now place units I thought I could just add a counter to towns.sqf, so I would get the total amount of all created markers stored in a variable, like: all_markers = 0; // Content of towns.sqf here (create markers) all_markers = all_markers + 1; // count each marker and store number in 'all_markers' But this would need another check for this variable's value, and also another code to select one of them according to the amount of created markers. I think it's kind of inconvenient. There must be another easier way to archive that, I guess. Is there any code I can use to get that in only a few lines? At the end I just need to: 1. find the amount of markers with name Mark_1, Mark_2, Mark_3, etc, etc 2. Randomly select one of these (i.e. to make it visible by setMarkerAlpha or sth else) Thanks in advance. -
Randomly count & select a marker by script
Godis_1 replied to Godis_1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey, thank you. :) I always do - but googling "Arma 3 sqf this" didn't bring me there lol... I should have tried it by "alt+e" in Sublime Text, lol. Thx :) -
Randomly count & select a marker by script
Godis_1 replied to Godis_1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Maybe a totally dumb question, but I'm curious about if there's any difference between: "this" and "_this" ? In Jquery "this" is a selector (and in sqf it's that too, or called "magic variable".), and "_this" is a normal variable. Is it the same for SQF? -
Randomly count & select a marker by script
Godis_1 replied to Godis_1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you. Due to code otpimization "param" could be the faster one, cause it doesn't nee a check if array is empty..Just thinking.. -
Randomly count & select a marker by script
Godis_1 replied to Godis_1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
mine? No, I've edited it just after posting.. :) -
Randomly count & select a marker by script
Godis_1 replied to Godis_1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well, then it must be: if (array > 0) then { _select_last_element = (_array select (count _array-1)); }; ?? But doesn't that also remove the last element from the array? Or is it just selected this way? Thank you, :) EDIT: Nevermind, this would indeed move the last selected element i.e. to another one, if there was another array in front of it, like "... array1 + (array2 select (count array2 -1));" Thx. :) -
Randomly count & select a marker by script
Godis_1 replied to Godis_1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thx to you guys helping me out. Got another thing, nothing complicated, but still not sure. I just want to select the last element of an array. According to the wiki it should be sth like the following, would it work like that? if (array > 0) then { _select_last_element = (_array select (count _array)); }; -
I am currently finishing the next update which includes TONS of new features and bugfixes! Stay tuned! ;-)
-
Randomly count & select a marker by script
Godis_1 replied to Godis_1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ooops, lol. Many thanks!! Seems we posted the same moment. -
Randomly count & select a marker by script
Godis_1 replied to Godis_1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Awwww... Damn! I'm realy dumb! I guess I can use what's already there... [allMapMarkers select {_x find "Mark_" isEqualTo 0}] call function_here; ?? :-D -
Randomly count & select a marker by script
Godis_1 replied to Godis_1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi again, my last problem :) So far you helped me a lot, thx a lot for this! However, I didn't want to open an extra thread for this. Now I got everything working so far. What I need is to put the content of the resulting array (_settlements in this case) into another array which is part of a function call. Example: ["Mark1","Mark_2","Mark_3"] call function_now; I got the whole list of towns inside the "_settlements" array (_settlements = ["Mark_1", "Mark_2", "Mark_3"];) but I'm not able to figure how I could put its content inside the function call. This doesn't work: [_settlements] call function_now; // also doesn't work ["%1",_settlements] call function_now; and tried some other things.. Might it work using the "str" or "set" command somehow? I don't know how to use it properly, am still very much in the learning process. Edit: After some further researching I found it could be done somehow using "select"... I'm trying to find it by myself, but will be thankful if someone could point me into the right direction here. thx So, what about sth like this: [(_settlements select (count _settlements))] call function_now; -
Randomly count & select a marker by script
Godis_1 replied to Godis_1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
All right, thanks again :-) Going to try around. -
Randomly count & select a marker by script
Godis_1 replied to Godis_1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Forgot sth. Can I "split" the result of "_settlements" into even and odd numbers and put them into a new array? I mean, two arrays in this case. One for the odd numbers, another for even numbers. And, In example, I am calling a function which needs markers to be defined in an array: null = [["Mark_4","Mark_10","Mark_16","Mark_20","Mark_24","Mark_30"], [blabla], ... is there another way to define them more accurate instead of putting them manually? Otherwise I would have to write an endless "if (_count > whatever_nr) then {};" condition, based off the amount resulted by "_count". Edit: Maybe this would work by "selectmarkers = _settlements select [0,3,5,7,9...]" // would that work? Edit 2: Ok, I got sth from the wiki: _even = [1,2,3,4,5,6,7,8,9,0] select {_x%2 == 0}; In this case can I replace the array with number with the "_settlements" array? _even = [_settlements] select {_x%2 == 0};