Jump to content
Sign in to follow this  
-SPA-LynxEye

Locality in MP.

Recommended Posts

Hi all

I'm stuck on issues where scripts is failing when trying to make certain things filtered with 'if local player' or 'if not local (vehicle player))' etc etc.

Actually, i'm writing scripts to enhance issues inside vehicles, and when i consider all work is good, then i will try to start with infantry... and then with 'publicvariables' to have a kind of i called "WARnet", that is a system to enhance coop missions made by other people.

So i'm not interested to build missions itself.

I'm only writing scripts to be added to existing or new ones missions.

The main lack of knowledgement that i have is the behaviour of locality in MP.

As an example, BIS-Wiki saying that a vehicle is always local to its driver/pilot... but i have a script that i'm filtering which 'human' player inside a vehicle can make a certain thing, and who can't.

Mainly, only the pilot (if human) is meeting that criteria.

Then, as the script to rearm vehicles is doing weird things only when more than one human player inside... finally, i got stuck in locality-MP.

I tried to repair-refuel vehicles with that local statements, and never getting bugs when more than one human player inside.

But when rearming, it is getting weird, and not always in the same way.

I only tried this 'no-mission' as the host of a MP session, not in dedi server.

And still i never tried to 'put' 2 human players inside a vehicle, so, me, as the host, not inside the vehicle, just to test if me, as the host, is interferencing in the locality of the vehicle.

And i said never tried, because i found nobody to test it. Just always with the same player, he and me inside a vehicle with more Ai and sometimes not.

If i'm alone as driver/pilot, it can be rearmed perfectly, if one player is driving/piloting alone, too, but when 2 human players inside and one of them is the driver/pilot... rearm can be impossible.

I have to say that i'm running the main script of 'supportvehicles' when a player is joining a vehicle, and the script is closed only when he dies inside the vehicle, the vehicle explodes with him inside, or just the player leaving the vehicle, including a little assistance to parachute (that ArmA is dealing it as an Air vehicle).

So, when the script is considering that you needing to rearm the vehicle, and enough near to one 'allowed' rearm-source... it will start to rearm ...

? local (vehicle player) : goto "REARM"

So it seems that only the player that BIS-Wiki saying in Locality-MP that its vehicle locality belonging to that player... its true in that condition.

I'm suppossing that BIS-Wiki want to say with 'local', that if a player via-script or something like this, is rearming a vehicle, no more players will notice that ammo update?

I think i'm wrong, because repairing and refueling is working 100% good but rearming not.

I tried a lot of methods to rearm... but still it remains the same.

So i changed the 'flags' method too, tried with 'Reload vehicle', setVehicleAmmo, the tricky method removeWeapon,AddMagazine,AddWeapon etc etc etc.

But always the same.

Because the bug that i'm speaking about seems like the vehicle is starting to rearm, yep, its rearming, but when via-script the vehicle is fully rearmed, then, it starts again to rearm from his original amount of ammo just before to rearm.

And infinite looping, till you are out of that 'rearm-source', or just leaving the vehicle.

If you entering again with another player still inside, it will fail again, and meanwhile you stayed out of the vehicle, if the player that was inside was the pilot, still is infinite rearm looping. Its weird, it seems like 'me' contaminated the vehicle hehehe.

It only fails when a 2nd human player is inside, no matter if gunner, 2nd gunner, commander, or cargo seat occuped.

If AI is present inside, and only one human player, no bugs.

It means, too many circus for nothing.

So, where i can find limits of locality or at least examples to learn how to handle this issues avoid get bugs?

Ah, another question, never tried to make a game logic because i'm not understanding it so good.

So, please, i'm working about 2 months in this vehicle support script, and i need where i can find more info about locality to learn more about ArmA.

I'm not interested in scripts made by other people so all what i need is just copy and paste.

If i am developing that script during 2 months, its because i prefer learn first, test thousand, and then just to say... 'yeah, finally i got it!'.

So, i prefer (if possible) links where to read info about locality.

I took a look into OFPEC, but didn't see tutorials about Locality, only certain issues that im not founding so practical for me.

Tried google, BIS-Wiki etc etc.

Thx in advance. welcome.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×