Jump to content

pedeathtrian

Member
  • Content Count

    284
  • Joined

  • Last visited

  • Medals

Posts posted by pedeathtrian


  1. KK, can you please also clarify remoteExec in part on manual removal of JIP statement: wiki page says I use remoteExec ["", car]; or remoteExec ["", netId car]; whereas I see these commands miss targets parameter. What value should it have? Same as at establishing JIP statement? Or maybe it is a correct syntax when functionName is set to empty string?

    Thanks.


  2. Tested on Escape from Altis vanilla 1.8.0 (bleeding-edge/26-07-2016/); A3 stable branch from steam (windows version).

     

    1. Actions for hack UAV terminal and UAV backpack are duplicated though I only have one UAV terminal and obviously only one UAV backpack, see screenshot

    OaL3hpd.jpg

    All actions work though.

     

    2. UAV terminals and GPS (could be found in weapon boxes near wrecks) allow to use map and see where enemy positions located (if markers enabled). At the same time "Find map" task is still not completed (see screenshots)

    aPMslLr.jpg

    S1gaEox.jpg

    Probably "Find map" task should be rendered completed upon finding UAV terminals and/or GPS also.

    Anyway, "Find map" seems to be purely optional task since I managed to complete the mission without this particular task completed. When enemy markers are disabled or set to "Show upon discovery", this task makes no sense at all. Call it "Find map (optional)" maybe?


  3. When running locally,  i go into the parameters options and can dbl click them and select which option to use.

    But when #login adminpw and showing that im in as admin on the server,  i go into the parameters section on the dedicated server and the options will not allow me to change them. 

    Sorry for dumb question, but... Are you by any chance trying to change parameters of already running mission? Does the same happen when you run #missions, reselect mission, then, while it is not started trying to change parameters?


  4. People are not dumb enough to start a nuclear war.

    Unless you can have quick and flawless victory and make everyone think you did the right thing. This way you can have any type of war started.


  5. Basically have to put that function into a loop and iterate through different directions. If any of the directions exceed a certain limit, or add up the total and divide ...

     

    Surface normal isn't the right tool, tests only the surface at the exact position.

    Get surface normal at some point, project it on XY plane (i.e. drop its z coordinate, and (optionally) normalize vector), convert projection into compass direction: you end up with direction of maximum slope gradient at that point.

    Beware of normal vectors very close to Z axis, they're the source of roundoff and other calculation errors.

    No direction loop required.


  6. Wouldn't the arguments in the first if{isserver} then {"stuff in here"} be unnecessary?  instead of doing nothing for the nil items it "turns on" something that doesn't exist?

    If you host the game (isServer) you can apply changes to objects directly. Otherwise, you use remoteExec with targets==2 to have this code executed on server. Of course, you can have remoteExec branch only, this will work on host too, costing you some time to execute extra call.

    This code does not do nothing to nils. Notice exclamation mark that inverts isNil. This code only operates on all non-nil elements.


  7. Looks like if the player is using godmode, it will always return -1. The problem is sometimes it returns -1 if your are NOT on godmode.

    Then check the amount of damage too (is exactly 0 in godmode):

    unit addEventHandler ["HandleDamage", 
    {
        params ["_unit", "", "_damage", "", "", "_hitPartIndex"];
        private _uid = getPlayerUID _unit;
        //systemChat format ["%1 Damage taken: %2, his UID: %3", _hitPartIndex, _damage, _uid];
        if (_damage == 0 && _hitPartIndex == -1) then {
            // report cheater (don't use systemChat only: it reports on cheater's machine; e.g. use with remoteExec)
        }
    }];
    

    Also, check that -1 case for _damage value, should not be 0 when not in godmode.

     

    UPD.

    And don't forget this event handler hits locally, e.g. on _unit's machine. Consider not having it from the beginning of mission but spontaneously setting it remotely by server to perform check only, then remove (just in case cheater can use removeAllEventHandlers).

     

    UPD2. Another plus of having EH spontaneously added is in the case when cheater has his own "HandleDamage" event handler which reduces the amount of damage inflicted. Your handler becomes last, and if I understand EH system correctly, you will see the value changed by cheater's handler (if he is smart he will not set it to 0, but reduce it significantly, so it still loks like he gets damage; but you can detect those cases too in your last EH).

    • Like 1

  8. But certainly can "reach" Russia's neighbours ...

    Don't get me wrong. I'm for disarming, arms proliferation control and making serious treaties. We had a treaty on anti-missile systems, then US decide they need no rules anymore and leave. There was a resolution in UN General Assembly to support that treaty. US, Israel, Micronesia and Paraguay voted against and 80 countries supported it. US leaves. Somehow it did not affect their reputation (somehow it never happens at all). Then they start to arm Russia's neighbours. Can't we have defensive/whatever we want systems on, our own after all, territory? This is the only option when other side does not want to negotiate and wants to arm instead. That's how it looks from here.


  9. Now I understand, and it makes sense...but now using your code, it breaks when I self host through the editor.  I get an error call type array expected code.  undefined variable _x   :( Shouldn't that work because, although it is sending it to the server, the server and the local player is the same?

    Ah, that's probably because of some nils sneak into array. You had this isNil check from the beginning. Try

    if (isServer) then {
        {
            if (!isNil "_x") then {
                _x hideObjectGlobal false;
                _x enableSimulationGlobal true;
            }
        } forEach (RaidArea079124 + RaidSite079124ObjectList)
    } else {
        [
            [],
            {
                {
                    if (!isNil "_x") then {
                        _x hideObjectGlobal false;
                        _x enableSimulationGlobal true;
                    }
                } forEach (RaidArea079124 + RaidSite079124ObjectList)
            }
        ] remoteExec ["call", 2, true];
    }
    

    Going the script route - would that basically mean that the addAction this is centered around does nothing more than call a script of the code I basically came up with to execute instead of trying to do nested in the addAction?  The intent is to have multiple raid sites pre-defined in the editor and have the user be able to select one and "turn it on".  I'd have to come up with a way of passing the arguments to that script through the addAction right?

    Right. Also try to minimize passing values through network. It looks like all you should really pass is identifier of raid area (or unit HVT1, which I guess is tied to that area). Then server uses all that heavy nearestObjects commands and enables and unhides what it finds there.

    After all I don't completely understand what is trigger for. nearestObjects could find all objects anyway.


  10. When you're a server, when you hit that action and this line executes

    [{_x hideObjectGlobal false, _x enableSimulationGlobal true;} forEach (RaidArea079124 + RaidSite079124ObjectList)] remoteExec ["call", 0, true];
    

    here's what happens:

    1. The contents of remoteExec's left argument array are not of type 'Code'; therefore evaluated locally, that is forEach command runs, unhides objects and enables simulation for them since you're a server; forEach returns nil (result of last executed command).

    2. command [nil] remoteExec ["call", 0, true] is executed, which is nonsense because it stands for call [nil] an all clients. But anyway, all job is done in 1, so everything looks fine (kinda works when you're a host, though some crazy luck it is).

     

    When you're not server, you fail to change objects' states since you're not the server, and hideObjectGlobal and enableSimulationGlobal are to be run by server only. You also fail the step 2 because of incorrect syntax.

    Correct syntax for call is arguments call body

    Therefore correct syntax for remoteExec would be [arguments, body] remoteExec ["call", targets, JIP], body is of type 'Code', so extra curly braces added:

    [[], {{_x hideObjectGlobal false, _x enableSimulationGlobal true;} forEach (RaidArea079124 + RaidSite079124ObjectList)}] remoteExec ["call", 2, true];
    

    Since required commands are to be run by server only, targets parameter for remoteExec is set to 2, not 0.

    BTW, is it really necessary to have JIP=true?

     

    In general, having "call" to be allowed for remote execution with arbitrary code as argument is bad design, consider reworking this part. For example, have a script for this and pass only list of objects to process.


  11. CfgWeapons_Config_Reference and a bit of tinkering.

     

    Cheers

    Tinkering. Tinkering everywhere :)

     

    Unfortunately there's absolutely no explanation of what Type field is and what values it can take. Something like side has. Intead all these magic constants we have.

    If there were a list of possible values I would have used it in the first place since I visited this page before posting in this thread, and the best I found (apparently didn't search too good) was displayName coupled with filtering by isKindOf.

    But thanks anyway.


  12. I was talking about propaganda. And I was not suggesting limiting any freedoms. "do something with this" was addressed more to their block rather than to introduce yours.

    We should rather dismantle that Islamistic bullshit and educate our own people on how to evaluate and ultimately deal with extrimistic propaganda. Or just different opinions for that matter.

    Exactly. "Deal with extremistic propaganda" is not necessary limiting something 'bad'. Instead it is producing more 'good' to oppose.

    Sorry for being unclear.


    We, civilized societies/countries, can't win a war against an enemy who follows no rule at all as long as we won't fight at the same level.

    What is their level? They have no material body (no, their 50k-250k troops do not count). You can't win with planes and rifles either.


    There's absolutely nothing I would envy an ISIS fighter for.

    There's absolutely nothing ISIS fighter would envy you for. He is simply not aware of.


  13. asd

    you missing the fact that most of those 'systems' Russia is complaining against is already used and deployed by Russia itself all around it's countryside ;)
    did anyone noticed Russia is the largest country on Earth ...

    That makes it harder to defend these areas and in no way makes it easier to attak other countries. Russia does not have those 'systems' at US borders.

     

    S300/S400 systems can be upgraded (S350) and improved and replaced (container type of launchers, unified)
    same goes about coastal batteries with cruise missiles etc.
    so again, it's nothing new already been there done that

    You missing the time factor again. Even if converted (S350 could not be), it has thousands of kilometers more in distance to reach US.

     

    Russia should be quiet or someone in NATO leadership come up with unified defense system
    and then Russia would need to go start from scratch or reason to whine ...

    Both sides should be quiet and negotiate and not leave treaties for strained reasons.

     


  14. They frighten people because they can kill whenever they want, wherever they want and with any weapon.

    No, sorry.

    How many deaths do you have caused by 'regular' criminal activity? Car (and all other technogen) accidents? Why u no frightened?

    They frighten people because you allow them to. Damn, you even help them to.

    Why no request for silence in social media like in Bruxelles? Of course it can't work every time, but hey, you are the guys with brains here, not them, right? Evolve.

    Now is the point where you create something to win.


  15. Most Islamic states are simply inferior.

    We live in information world and our societies are fully open and vulnerable to threats coming from info space. And those inferiors know that well.

    Your armies are for wars passed long ago. No matter how much troops they have if you don't fight them where they fight you, in information space. Unfortunately information freedom unties their hands and ties your. Do something with this and not with their troops.


  16. reaching ? considering the AAA and AA layered defense Russia has ... that's just non-sense

    also the nuclear deterrent works as Russia has submarines, ships, mobile (trucks, trains) and static platforms with nukes (and more likely even something in space (cause treaties don't matter for them))

    The good and the best defence systems have fallen in the past. Does that say something to you?

    Reaching, exactly. What's the problem with this? It is very tightly tied with time. Look at Europe's map: rockets based in latest NATO countries (like Estonia) could reach russian military facilities in 6 minutes. Six minutes, Carl! Long before all those trains and submarines are ready to fire. This is reaching. When you've gone full retard and want this world burn to ashes, place multi-purpose anti-missile systems here.

     

    the USA would need to have 101% working protective system to even think about attacking other nuclear power as ICBM aren't the only threat either ...

    For today, probably...

     

    so w/e someone claims about possible 'strike' it's just brainwashing

    because in terms of military tactic, you would need to annihilate every single asset of enemy at once otherwise the risk is too great

    Brainwashing is making people think that the ability to place rockets (incl. silo-based) in Europe would not be used when such necessity appears.

    Nuclear powers balance is not what you discuss in terms of military tactics. Every small step can pay off in the future, and not making this step can cost you everything. Not being able to eliminate enough of enemy's facilities today does not mean you will not be able tomorrow. And you prepare today. This is called strategy btw.


  17. Instead of getting parents for every you can use isKindOf (it's more effective than BIS_fnc_returnParents):

    if (_className isKindOf ["Pistol", configFile >> "CfgWeapons"]) then {
        // ...
    }
    

    or getting all pistol configs at once:

    _pistolConfigs = "((configName (_x)) isKindof ['Pistol', configFile >> 'cfgWeapons']) && (getText (_x >> 'displayName') != '')" configClasses (configFile >> "cfgWeapons"); 


    Another approach is to check "cursor" property of weapon class, which could be "hgun", "arifle", "srifle", "mg", "missile", "rocket", "", "EmptyCursor" (and probably others). This way you can tell rifles from machineguns for example or sniper rifle from assault one.


  18. NATO can't have own anti-missile security even against 'minor' scale attack ;) ... weird logic ....

    The point is all that anti-missile systems are easily converted into offensive systems reaching most russian military facilities (including nuclear). Not saying these rockets can carry nuclear warheads.


  19. At the moment all I've tried is to replace the unitnames in the UnitClasses file but whenever I go to start the mission I get stuck on the black loading screen. I've seen a few other people had this problem but cant seem to work anything out. Do I have to change anything else? The units I'm using are still in bluefor. 

    All new mods (CfgPatches classes of used addons) must be listed in addOns[] array (in class Mission) in mission.sqm (and removed mods should not).

×