Jump to content

Fiodor

Member
  • Content Count

    12
  • Joined

  • Last visited

  • Medals

Everything posted by Fiodor

  1. Fiodor

    Need fast reload advice

    I second this. Would be pretty cool.
  2. Fiodor

    Trigger MP locality?

    I found this while browsing the biki, "(...) Triggers created in editor exist on all machines (a trigger is created per machine, local to it), and they run on all machines (conditions checked, onActivation/onDeActivation executed when condition is true etc)Because the trigger is created on each machine, changing the trigger properties (statements, onActivation, etc. etc) has only local effects.Unconfirmed: Is the effect of moving or deleting triggers global or local. One would believe local." from: https://community.bistudio.com/wiki/6thSense.eu:EG#Locality While it does not answer all your questions directly, we can assume that creating a trigger with createTrigger would simply create a local copy on all connected clients. If you apply local commands to that trigger (without proper replication) you'd probably alter that instance of trigger on that local instance of the game and it would be different from the triggers in other connected players' instances of the mission. That's as much as I can assume from the info provided. As for the activation/deactivation locality conditions you'd probably need to check that out with some tests. Also available to help determine locality, in this and any tests are the 'local' and the 'owner' commands to determine if the object is local and who is the owner. Hope this bit helps you a little.
  3. Hello, I've been trying to create a shoothouse for my community but I've run into a very strange problem. Attached below is the mission file. I've made a collection of scripts to create a CQB enviroment with randomized entry point and random target placement. Works fine in SP (so logic is a-ok) but I've tried to test it in a non-dedicated server and alas not only the doors are not inmediately moved, but the targets are sometimes not moved at all; actually, the targets are moved in the host machine just fine, but the other player only sees the target in the new position once the host has shot it or after some random delay. Currently the scripts are triggered via addAction, which executes via execVM, scripts that change the position and direction of the objects syncronized. As I said, the logic works as intended in SP, and for whoever is Server when in coop, but the other players experience the aforementioned delay in object movement. As far I've understood it, effects of setPos are global and broadcasted so if my script only makes use of that command (and setDir), why is it experiencing this delay? You can download the mission here. Any help would be appreciated. And, thanks for reading! These scripts may be used in part or completely only when due credit is given.
  4. Hello Tajin, thanks for replying with more info; to be more specific, let me tell you: One script selects an object at random, and moves it upwards, out of the way. Movement is not supposed to be smooth, it should just 'pop' upwards. Another script, goes through a collection of objects (which act as position markers) and places and orients targets in the same positions as those objects. Again, movement here is only placement, no animation required. Targets should just appear there. Problem for both is that sometimes when co-op hosting, the host sees the changes instantly and in other clients the changes reflect, sometimes, after some seconds (upwards of 10) or sometimes only when the host interacts with the objects (generally when targets have been shot) are the positions updated (and sometimes not even that makes the positions update). In singleplayer these missions, works like a charm. Another doubt that I have is, if 'setPos' is global, then shouldn't it execute on all clients? or perhaps it is a matter of running the script in an unscheduled enviroment? Even then, there shouldn't be that much delay between updating position between clients. This is really a head-scratcher, if somebody could provide some insight, I'd be really thankful.
  5. An example of this could be callling the script that executes the position change with remoteExec ["fn_scriptMoveObjects"], with no second parameter, inducing the execution of such function/script on all conected clients, right? I'll give it a try, I though making the server do it would be more efficient, and since there's a selectRandom in there it might make different selection in each computer. Please correct me if I am wrong.
  6. Indeed I am using an action to trigger it, I forgot to mention it, sorry. Will add it now to the original post. Will definetly try this tonight and check the results. Thanks for the reply.
  7. Hi there, name's Fedor again, this time around I am trying to spawn units in a dedicated server. Currently I tried the following to no avail: if (!isServer) exitWith {}; if (isServer) then{ //tried both with and without the isServer? verification _spawnUnits = ["O_Soldier_F"]; _obj_base = _this select 3 select 0; _count = _this select 3 select 1; _skill = [0.1, 0.15, 0.25]; _ammo_count = [0.0, 0.1]; _max_distance = 2; _max_azimuth = 360; for "_x" from 0 to _count do { _spawnRadius = random _max_distance; _spawnAzimuth = random _max_azimuth; _spawnObj = selectRandom synchronizedObjects _obj_base; _randomPos = _spawnObj getPos [_spawnRadius, _spawnAzimuth]; _curElem = selectRandom _spawnUnits; //first try, should only be local, doesn't do nothing in dedicated server [_randomPos, EAST, _spawnUnits, [], [], _skill, _ammo_count, [], random 360] call BIS_fnc_spawnGroup; //Afterwards I tried this //same deal, try to exectute it through BIS_fnc_MP, nothing on dedicated server works in SP _parameters = [_randomPos, EAST, _spawnUnits, [], [], _skill, _ammo_count, [], random 360]; [_parameters, "BIS_fnc_spawnGroup", true] spawn BIS_fnc_MP; //And also, this. //try to execute it through remoteExec, still nothing... this one doesn't work in neither SP nor MP [_randomPos, EAST, _spawnUnits, [], [], _skill, _ammo_count, [], random 360] remoteExec ["call BIS_fnc_spawnGroup", 0, true]; }; }; I have tried all combinations of isServer and the simple BIS_fnc_spawnGroup in combination with BIS_fnc_MP or remoteExec. Meaning I tried 6 versions one with isServer verification and spawnGroup, one without isServer and with spawnGroup one with isServer verification and with remoteExec + spawnGroup one without isServer and with remoteExec + spawnGroup one with isServer verification and with BIS_fnc_MP + spawnGroup one without isServer and with BIS_fnc_MP + spawnGroup It is after this extensive and quite puzzling testing, that I've come here to ask for your wisdom in spawning units in a dedicated server (hosted as a dedicated machine). Have I perhaps flunked a parameter in function (in SP works fine) or perhaps is there some sort of MP previous steps I haven't properly followed? Edit: I have to mention that I've tried to run this from addAction in a laptop, this is the code inside the laptop //uses spawn group only this addAction ["spawn 5 units", "scripts\spawnOnSyncedObjs.sqf", [trigger_spawn, 5] ]; this addAction ["noSrv - spawn 5 units", "scripts\spawnOnSyncedObjs_noSrv.sqf", [trigger_spawn, 5] ]; //uses spawn group with remote this addAction ["r - spawn 5 units", "scripts\spawnOnSyncedObjs_remote.sqf", [trigger_spawn, 5] ]; this addAction ["rNoSrv - spawn 5 units", "scripts\spawnOnSyncedObjs_remoteNoSrv.sqf", [trigger_spawn, 5] ]; //uses BIS_fnc_MP this addAction ["mp - spawn 5 units", "scripts\spawnOnSyncedObjs_mp.sqf", [trigger_spawn, 5] ]; this addAction ["mpNoSrv - spawn 5 units", "scripts\spawnOnSyncedObjs_mpNoSrv.sqf", [trigger_spawn, 5]
  8. Hi, name's Fedor and I'm trying to add some functionality to the editor via-module that would save a lot of time for editors of my community. It's the first time I try any kind of scripting in Arma and it took a great deal of keyboard-to-head to get to where I am... So, here's where I'm at: I have an editor module (functioning as per the step by step this link) that has a couple arguments, like this: class Arguments: ArgumentsBaseUnits { class [b][color="#B22222"]Units[/color][/b]: Units {}; class [color="#000080"]SampleArgument[/color] { displayName = "Some data"; // Argument label description = "Some data I want to use"; // typeName = "STRING"; //type of the arg }; [indent](...)[/indent] }; And myModuleFunction, that is called when the Editor Module is initiliazed in the game: // ???? aparently this is the triggering entity _logic = [_this,0,objNull,[objNull]] call BIS_fnc_param; //synced units, these units are the ones declared in the [b][color="#B22222"]Units[/color][/b] in the Arguments class in the Editor Module [b][color="#B22222"]_units[/color][/b] = [_this,1,[],[[]]] call BIS_fnc_param; _activated = [_this, 2, true, [true]] call BIS_fnc_param; if (_activated) then { //magical stuff happens with the info }; So my question is... how would I go about accessing from the function (myModuleFunction) custom defined arguments, such as SampleArgument (as declared in the editor module class) ? The way I see it, you can define custom variables in the editor module so there should be a way to access them. I have yet to see an addon like this. So... is this even possible ?
  9. Thanks, I've added that the function example in the step-by-step guide so that there's at least an example of that.
  10. Thank you very much! Did I miss any documentation in bi wiki, or is this something you knew out of experience? I'd like to know if there's any additional information sources that I missed, so in the future I can answer my own questions, instead of just researching here and there, only to end up asking in the forums.
  11. I just wanna comment that, as a part of SFS we usually have a blast inspite/thanks to all the bugs in Arma. We are very beginner friendly community and any latin american brother is welcome to join us.
  12. A quick and dirty solution might be setting the courage of the AIs to 0 with setSkill array. Makes them run most of the times. Example would be: COWARD_AI setSkill["courage", 0];
×