Comrades in Arms Discussion Board

Full Version: Arma 3 - PMC Versus: Oriens (co10)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
(01-16-2015, 12:41 PM)McGregor link Wrote: [ -> ]Well as we loaded the mission I crashed and had to restart and JIP into the briefing. Might that have had any thing to do with my clothing situation?
I don't think that would be the reason. I think that using the init field is not recommended because it's applied on everyone whenever someone JIPs, and from other reasons? Maybe our experienced mission makers will know to explain better.
(01-16-2015, 07:23 AM)Fuiba link Wrote: [ -> ]Any suggestions on how to make this piece of shit work since the Editor's Preview is next to useless? Big Grin


Would be nice if we can simulate locally how mission behaves on dedicated. We'd waste less time and avoid a lot of hassle and double guessing. This is ARMA 3 editing.


I dunno how editing was in ARMA 2 but in A3 is a bitch if you want to make something out of ordinary, most of the time i try to find a way around of a problem than making the actual mission. Being a beginner editor myself doesn't help either Sad
For inventory I'd use Alwarren script suggested in his manual:


http://ciahome.net/forum/mission-making/...ng-manual/
(01-16-2015, 12:55 PM)alias link Wrote: [ -> ]Would be nice if we can simulate locally how mission behaves on dedicated. We'd waste less time and avoid a lot of hassle and double guessing. This is ARMA 3 editing.

I dunno how editing was in ARMA 2 but in A3 is a bitch if you want to make something out of ordinary, most of the time i try to find a way around of a problem than making the actual mission. Being a beginner editor myself doesn't help either Sad

Yeah I guess we all have a love-hate relationship with Arma. One of the reasons my missions are so simple (no fancy scripting) is because I find everything so goddamn difficult with Arma. And when I finally get something working, you guys tell me that it doesn't work on dedicated server Big Grin

Anyway, this might be a good time for me to revamp the equipments from init field to somewhere else since I've only released a couple of missions in the pack. I wouldn't welcome the job if I had 20 missions out Smile

Edit: I've done the loadouts this way since Arma 2 and I don't think you've had similar problems before this. Go figure  :o
(01-16-2015, 07:23 AM)Fuiba link Wrote: [ -> ]I do all the loadouts old school with the units' init-field. I just checked and noticed nothing out of the ordinary in 5's slot. Everything works well with the loadouts at my end. Any suggestions on how to make this piece of shit work since the Editor's Preview is next to useless? Big Grin

I am not using the init fields anymore except for a few exceptions (like moveInCargo).
This is how I do it right now in init.sqf:

PHP Code:
/* 
 * Important!
 * There is a small window were "isPlayer xxx" yields true on a dedicated, but
 * "local xxx" on the server ALSO yields true. The player object stays on the server
 * until the client has connected. The below makes sure that this script doesn't continue
 * on the client's machine until the player is connected correctly.
 */
if (!isDedicatedthen
{
  Â  waitUntil {!(isNull player)};
  Â  waitUntil {alive player};
};

/* 
 * Initialize the loadouts 
 * This array contains all my loadout scripts in the order that units appear in the mission.
 * You can use other methods to determine a loadout, like class
 */
_loadouts = [
  Â  "loadouts\ksk_tl.sqf",
  Â  "loadouts\ksk_ar.sqf",
  Â  "loadouts\ksk_sniper.sqf",
  Â  "loadouts\ksk_at.sqf",
  Â  "loadouts\ksk_medic.sqf",
  Â  "loadouts\ksk_tl.sqf",
  Â  "loadouts\ksk_ar.sqf",
  Â  "loadouts\ksk_sab.sqf",
  Â  "loadouts\ksk_gren.sqf",
  Â  "loadouts\ksk_medic.sqf"
];


/*
 * FHQ_fnc_safeAddLoadout is a function in the function module I use for every 
 * mission. See below
 */
{
  Â  if (local _xthen {
  Â  Â  Â  _loadout _loadouts select _forEachIndex;
  Â  Â  Â  [_x_loadoutcall FHQ_fnc_safeAddLoadout;
  Â  };
} foreach 
playableUnits

If you are not using custom functions in your mission, you can insert this at the top of your init.sqf:

PHP Code:
FHQ_fnc_safeAddLouadout = {
  Â  _unit _this select 0;
  Â  _scriptName _this select 1;

  Â  if (!local _unitexitWith {};

  Â  _isHandled _unit getVariable "FHQ_loadout_handled";
  Â  
  Â  
if (isNil "_isHandled"then {
  Â  Â  Â  _unit setVariable ["FHQ_loadout_handled"truetrue];
  Â  Â  Â  _unit call compile preprocessFileLineNumbers _scriptName;
  Â  };
}; 

Hope this helps Smile
(01-16-2015, 12:55 PM)alias link Wrote: [ -> ]Would be nice if we can simulate locally how mission behaves on dedicated. We'd waste less time and avoid a lot of hassle and double guessing. This is ARMA 3 editing.

Well you can, just launch the dedicated server on your own machine, you can run it in parallel. Use this little tool to launch the server, including addons. Then test your mission.


Quote:I dunno how editing was in ARMA 2 but in A3 is a bitch if you want to make something out of ordinary, most of the time i try to find a way around of a problem than making the actual mission. Being a beginner editor myself doesn't help either Sad

Arma 2 wasn't much better. The key, as I said in my guide (which I have to revise again, some new information for it popped up). is locality, locality, and locality. Always ask yourself, where is my object stored, and what effect does the statement have. Do not rely on "logic thinking", some things are just different to what you expect.
(01-16-2015, 07:23 AM)Fuiba link Wrote: [ -> ]I do all the loadouts old school with the units' init-field.

Don't do that. It will never work correctly. You will end up with a ton of problems with people JIPing in.

Honestly, never use the init field. In Arma 3, the init field of every units is evaluated every time someone connects, so you might end up running the init field for all units times the number of players that JIP.

Check this thread for a fool-proof system
Thanks for the help, Alwarren.

I put all your code in my init.sqf.
Made a loadouts\ksk_tl.sqf file in the mission folder.
Put this inside ksk_tl.sqf:

Code:
removeAllWeapons this;
removeAllItems this;
removeAllAssignedItems this;
removeUniform this;
removeVest this;
removeBackpack this;
removeHeadgear this;
removeGoggles this;

And all I got in the Editor's Preview is the unit (set as Player) with its defaul loadout.
(01-16-2015, 01:32 PM)Varanon link Wrote: [ -> ]In Arma 3, the init field of every units is evaluated every time someone connects, so you might end up running the init field for all units times the number of players that JIP.
Just confirmed with Oukej that this is NOT by design. He'll pass it on, ticket not even required.
(01-16-2015, 01:32 PM)Varanon link Wrote: [ -> ]In Arma 3, the init field of every units is evaluated every time someone connects, so you might end up running the init field for all units times the number of players that JIP.

If I understood correctly, this can't be right. Wouldn't this mean that each time someone JIPs in my missions, everyone's loadout would be reset to full mags etc.?
(01-16-2015, 03:17 PM)Fuiba link Wrote: [ -> ]If I understood correctly, this can't be right. Wouldn't this mean that each time someone JIPs in my missions, everyone's loadout would be reset to full mags etc.?
That exactly what happens. And this is a bug. It wasn't like that in Arma 2.
Oh FFS  >Sad

I just tried the mission on a dedicated server and noticed to my extreme disappointment that unitCapture doesn't work with dedicated servers. That's just nice since I just spent hours in the helicopter cockpit trying to land on a small rooftop and reworking the friendly AI's flightpath. I guess this time is as good as any to open that cheap whisky.
(01-16-2015, 03:12 PM)Variable link Wrote: [ -> ]Just confirmed with Oukej that this is NOT by design. He'll pass it on, ticket not even required.
Well, he now says he checked and that's on purpose. forget what I said...
(01-16-2015, 03:21 PM)Fuiba link Wrote: [ -> ]Oh FFS  >Sad

I just tried the mission on a dedicated server and noticed to my extreme disappointment that unitCapture doesn't work with dedicated servers. That's just nice since I just spent hours in the helicopter cockpit trying to land on a small rooftop and reworking the friendly AI's flightpath. I guess this time is as good as any to open that cheap whisky.

Yeah, I encountered that problem before. There might be a way to work around it, but it is tricky to say the least. I'll have to experiment with it.

The problem is, unitCapture and replay requires a GUI since it uses user interface events for proper timing. My idea was to change the owner of the unit being played to a client and run the playback on his machine. There is an inherent danger of the guy crashing or logging off which would revert back to the server, but as I said, it's a workaround, not a fix.

The other idea would be to rewrite the fucked up code, since it is all SQF anyway. But then you run into the same issue again, namely the lack of any good timing functions on server-side.
(01-16-2015, 02:18 PM)Fuiba link Wrote: [ -> ]And all I got in the Editor's Preview is the unit (set as Player) with its defaul loadout.

Weird... can you post the entire init.sqf?
EDIT: The problem is, "this" only works in init fields. You need to use _this Smile
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14