Jump to content

barbolani

Member
  • Content Count

    1197
  • Joined

  • Last visited

  • Medals

Posts posted by barbolani


  1. Hi!

     

    After correcting an small typo is it seems to work!

     

    The problem now: When using non ASL comparisons returns allways zero. I am not understanding why but I need to use this comparing marker position (third array param is zero) and a sample position.

     

    Something like this:

     

     

    _pos1 = getMarkerPos "marker_to_attack";
    _pos2 = _pos1 getPos [100,0];
    _result = [_pos1,_pos2] call fogCheck;
    if (_result >0.3) then {attack!} else {dont attack!};

    EDIT: Yes, I'm stupid :) Z coord. is a must to know if it's foggy on the target position or not. Will build the function creating a roadcone or whatever thing in the marker position until I find some way to know the ASL position of the ground level of a marker position. Thank you!


  2. Wow!

     

    First of all, I am the kind of guy with very basic math, so I got lost too early.

     

    I  conducted some tests with combinations of all the possible patterns without getting a clear idea on what equation was behind, but never thought it was that complex with all those letters and numbers :)

     

    What kind of number returns your function? My intention is to know if there is good weather to perform an assault, so I dont need ultra precise parameters, if a soldier cannot see clearly more than 200 meters on the target position, then dont attack, but I dont care if its 150, or 300...

     

     


  3. Im afraid you are not understanding me.

     

    I dont want to change the fog.

     

    Fog param getter commands work well with the engine fog, didn't touch anything on the weather settings and work well. Dont want to set anything.

     

    What I want to know if it is a foggy day or not.

     

    If you just say: if (fog > 0.5) then {hint "Today is a foggy day!"} you will see the hint in clear air sometimes.

     

    If you pick data from fogParams you see the first param does not really affect on fog presence but a combination of the second and third param are the ones that make you experience fog depending on where you are.

     

    EDIT: fog == fogParams select 0, useless command.

     

     


  4. Hi!

     

    I'm back to Arma scripting :)

     

    I want to make a dynamic AI decision on wether attack or not depending on several parameters. One of them is the fog state, which you know in Tanoa is important.

     

    Ok, fog command does not tell you how foggy is the day, you may have 0.1 in return but due to the other params, you cant see a shit.

     

    I played a bit with fogParams but I am not really getting what to tell the script to check to return is foggy or not. It seems it depends much more on how close to zero is the second param than the first one.

     

    Any tip around?

     

    Thanks in advance!


  5. The whole match data is saved in the server, so, no matter what your friend has, at least things like unlocked weapons, FIA money etc.. should be saved.

     

    When you say "it works for me when I do it on my own" you mean in the same environment, server etc.. or doing it in another pc or server on your own?

     

    If it's on the same platform, it's very weird.

     

    If not, then it is something about the server config and server profile. Your server has a profile?


  6. Additionally to what KK's says, if the return was nil you would have error, not only because of the brackets, but also because you are checking null before nil.

     

    Correct code should be:

    if (isnil "_toevac" ) exitWith {};

    if (isnull _toevac ) exitWith {};

     

    Also this: if (_toevac  == objNull ) exitWith {}; will return allways false, as objNull never equals to anything, to check if something is null, it's isNull command.


  7. Resets are not realistic.

    Neither respawning. In order to be realistic you should commit suicide after being killed in game ;)

     

    If you reproduce this error in SP, then that's not the cause. Can you confirm?

     

    For some reason I always get crazy amounts of fog (I can barely see 10m) at 1pm, which makes it unplayable at that time since the AI pretty much ignores the fog completely.

    I've waited for several days now but its always the same. I can currently only play at nighttime where the fog is a bit lighter.

     

    It's how BIS coded Tanoa, with very heavy fogs.

     

    Waiting for 8 hours should do the trick, as engine seems to have some forcé weather change when skiptime is done. Be patient as fog needs some time to dissapear.

×