Road Warrior Take 2?

First off, i’d like to say thanks to those that attended, and I’m extremly dissapointed that it didn’t work as advertised.

The attachTo command worked fine on the development server with Dachi and me. The war rigs’ accessories showed up.

I’m not sure what went wrong on the dedicated server. It was very frustrating when it wasn’t working properly.

The good news is that I’ve made compositions of all of my post-apocalyptic vehicles and squadrons so you can create your own mad max missions. I’m working out what went wrong. I’m wondering if someone can look at it with me so I prep it for dedicated server in future? Or at least tell me what went wrong and how to fix it.

My post processing injection filter was copied from ALIAS, and you’re free to use it for your sandy missions

[code]effect_screen = ppEffectCreate FilmGrain", 2000];
effect_screen ppEffectEnable true;
effect_screen ppEffectAdjust [0.1,0.1,0.5,0.1,0.1,true];
effect_screen ppEffectCommit 0;

"colorCorrections" ppEffectAdjust[ 0.87, 1, 0.01, [-0.27, 0.17, 0.33, -0.26],[0.76, -0.4, 0.86, 0.86],[-0.57, 0.81, -1.2, 0.88]];
"colorCorrections" ppEffectCommit 0;
"colorCorrections" ppEffectEnable true;
[/code]

You can find the original mission file and the compositions from a stable state here https://onedrive.live.com/?id=1D8C274E5DB6BA5C!989&cid=1D8C274E5DB6BA5C

unzip the file and put them in C:\Users[yourname]\Documents\Arma 3 - Other Profiles[your arma name]\compositions

Start up the editor, go to groups (compositions) its like a symbol of linked circles…

You can also play the mission i’ve made by yourself from the editor and see how the vehicles function properly.

The version on the dedicated server is broken. The version on the development server works, but is an older version.

I already looked into it and I think I know what went wrong with attachTo.

See - the command is really meant to be used with relative coordinates to the destination object’s center or another attachment point, list of them here:

_expl1 attachTo [player, [-0.1, 0.1, 0.15], "Pelvis"];

until you used it in the mission like you did, I wasn’t even aware that it can figure out the relative positions between objects and calculate the attachment based on that.

The next piece of the puzzle is that attachTo takes global arguments (AG) and has global effect (EG), see the wiki. This means that if the server (or any client) runs the command, it can do so on any object (even objects on other clients) and the result is always broadcasted to everybody.

Another piece is that unit init lines are executed by all, server, clients, even on JIP.

Putting this together - when we loaded into the mission, the map screen, everything was fine because even though it was greatly inefficient as all computers did attachTo on all objects, broadcasted it to everybody, creating lots of extra unnecessary traffic and overhead, the simulation didn’t start yet. Meaning all attachments worked well at this point as the game started.

The problem happened when Hateborder (or someone else) disconnected and joined in progress (JIP). The init lines were run again and HB’s client received wildly different positions of the objects to be attached and their destination vehicle and did what you told it to - figure out the relative positions and attach the objects, which it did, telling everybody else to use the new positions.
As such, the objects were attached, just miles away from the vehicles.

So to fix this, you need to run attachTo only on the server:

if (isServer) then { blah blah attachTo blah }

It should be possible to modify all attachTo occurences at once in the .sqm file via a regexp, without you having to manually go and edit them all.

However the mission had some other problems like medic not having surgical kit, players joining as seaguls (?), etc.
I also noticed that you used some scripts to set the orientation of objects (like the tires on the trucks) - you don’t need scripting, there’s a rotation tool in Eden on the toolbar (also activated by F2 or "2" or something.)

That was fast. It’s good to know we can in fact use attachTo during missions. Hoping my efforts aren’t wasted and people want to use my compositions.

[quote user_id=“13633351” avatar=“https://assets-cloud.enjin.com/users/13633351/avatar/medium.1434890353.jpeg” name=“Freghar”]The mission had some other problems like medic not having surgical kit, players joining as seaguls (?), etc.
I also noticed that you used some scripts to set the orientation of objects (like the tires on the trucks) - you don’t need scripting, there’s a rotation tool in Eden on the toolbar (also activated by F2 or "2" or something.)[/quote]

Perhaps the backpack wasn’t big enough for the surgical kit… bit of an oversight, sorry.

There were seagulls? :expressionless:

Also yes I had to use scripts to set orientation, because when they are "attached to" they reset to 0 degrees. You have to manually set their orientation through script once attached to an object.

Xander had an idea that we could add either a set of editor modules to synchronize with or a text line to object attributes for attaching stuff. This would abstract all the isServer logic away from the mission maker … and we could even set the orientation (setVectorDirAndUp - horizontal/vertical rotation) to what it was before attaching.

[user avatar=“https://s3.amazonaws.com/files.enjin.com/821401/site_logo/small.png” name=“Xander”]12587882[/user] , maybe a hybrid solution - a checkbox "Attach synchronized objects" - would work best. One would simply enable it for the vehicle and then sync the decorative objects to it. A simple isKindOf "AllVehicles" when iterating would exclude other things like synced triggers.
Feel free to give it a shot if you want. :slight_smile: (If not, I’ll probably do it in a few weeks.)

I had a great time, other than being a seagul and the mission not working. Hope you get this fixed.

Did anybody happen to record my motorcycle roll jump, my recording got corrupted by arma crashing, sadface.

[quote user_id=“13633351” avatar=“https://assets-cloud.enjin.com/users/13633351/avatar/medium.1434890353.jpeg” name=“Freghar”][user avatar=“https://s3.amazonaws.com/files.enjin.com/821401/site_logo/small.png” name=“Xander”]12587882[/user] , maybe a hybrid solution - a checkbox "Attach synchronized objects" - would work best. One would simply enable it for the vehicle and then sync the decorative objects to it. A simple isKindOf "AllVehicles" when iterating would exclude other things like synced triggers.
Feel free to give it a shot if you want. :slight_smile: (If not, I’ll probably do it in a few weeks.)[/quote]
I’ve been thinking about it, and I feel that addition in the attributes will clutter the attributes panel too much with non-essential stuff if we proceed making more additions like this.
I’ll probably implement it how I was planning it first, just like the Fire Support modules.
Probably will do it next week, because atm I got a game development itch which has to be answered haha

The custom attributes are in a collapsed-by-default section and for the last half a year, I wasn’t able to come up with more than 1 attribute, so I wouldn’t worry about that. :slight_smile: In contrast, there’s much more editor modules already. However it’s your call, I’m trying to distance from the codebase if anything.

When’s take two coming? =D

oh man… its been a while, but I saved all the compositions. Can make a preview mission for you