OFPEC Forum

Addons & Mods Depot => ArmA - Addons & Mods Beta Testing => Topic started by: loki72 on 15 Jun 2008, 00:33:20

Title: a better view
Post by: loki72 on 15 Jun 2008, 00:33:20
greetings,

version 1.1 is out.

the ability to pick any number view distance and it is so.
the ability to pick the terrain detail level.

(http://img520.imageshack.us/img520/457/abv1qb6.th.jpg) (http://img520.imageshack.us/my.php?image=abv1qb6.jpg)
(http://img209.imageshack.us/img209/461/abv2nw6.th.jpg) (http://img209.imageshack.us/my.php?image=abv2nw6.jpg)
(http://img329.imageshack.us/img329/6484/abv3vv9.th.jpg) (http://img329.imageshack.us/my.php?image=abv3vv9.jpg)



Title: Re: a better view
Post by: Mandoble on 15 Jun 2008, 00:43:11
Not sure if you already had it covered, else you may check player vehicle changes to ensure the action is present there where the player is, outside or inside vehicles.
Title: Re: a better view
Post by: loki72 on 15 Jun 2008, 00:50:31
rgr that.. it gave me fits for a sec.. but this seems to do the trick...

config.cpp

Code: [Select]
class RscDisplayEmpty;
class RscDisplayMission : RscDisplayEmpty {
access = ReadAndWrite;
  idd=46;

onLoad="execVM ""\loki_dlg\init.sqf"";";
};

though i don't understand the reason for it... :P

edit: hmmm.. i never cared about the use in a vehicle... however.. if i wanted to have the action at all times... what would that code look like?
Title: Re: a better view
Post by: Mandoble on 15 Jun 2008, 01:56:44
Something like this:
Code: [Select]
private["_veh", "_idx"];
_idx = -1;
while {true} do
{
   if (_idx == -1) then
   {
      _idx = (vehicle player) addAction ["action", "script.sqf"];
      _veh = vehiche player;
   };

   if (_veh != vehicle player) then
   {
      _veh removeAction _idx;
      _idx = -1;     
   };
   Sleep 1;
};
Title: Re: a better view
Post by: loki72 on 15 Jun 2008, 03:11:38
i get this when i run it  ???

(http://img231.imageshack.us/img231/9412/errorzi6.jpg)


edit: on a side note... have you ever thought about taking all the (solved) scripts, codes, and snippets.. along with your understanding of scripting and put together a scripting pdf manual thingy..?







Title: Re: a better view
Post by: Planck on 15 Jun 2008, 03:16:52
Probably should read:

_veh = vehicle player;


Planck
Title: Re: a better view
Post by: loki72 on 15 Jun 2008, 03:26:16
lol.. stoopid arma..

thx for the tip planck.. when it gave me the same error in another spot.. i went back and looked...

Code: [Select]
_veh = vehiche player;
vehicle

had nothing to do with a " ; "... ?!

wonder how many times i've ended in defeat looking for a ; and not a misspelled word... :cool2:

works great mando...

really hope you're on the arma 2 team....



Title: Re: a better view
Post by: Trash Can Man on 22 Jun 2008, 06:34:00
I was wondering anyone picked up on that!   ;)
Title: Re: a better view
Post by: loki72 on 27 Jul 2008, 07:47:46
greetings,

2 things:

the above download link is updated to v1.1

also.. how can i make sure the addaction is always there? it works good as is.. but in the warfare maps its doesn't show up.. and i have to call it via radio...

Title: Re: a better view
Post by: Wolfrug on 27 Jul 2008, 09:17:52
Spooner had the same problem, and posted about it in the Warfare forums: LINK (http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=7539a0a6e3fbf05bd3703fbe55e433d8;act=ST;f=81;t=74603). No replies, but there's the reason. Hardcoded removeActions. SO no good :(

Wolfrug out.
Title: Re: a better view
Post by: loki72 on 27 Jul 2008, 09:32:27
greetings,

geeze... thx wolfrug... and spooner.. i thought as much. that's why the radio command works around it....

init.sqf
Code: [Select]
_trgobjA = createTrigger ["EmptyDetector", position player ];
_trgobjA setTriggerText "ABV";
_trgobjA setTriggerActivation ["India", "PRESENT", true];
_trgobjA setTriggerStatements ["this", "nul = [] execVM ""\loki_dlg\Scripts\ABV_Settings.sqf""", ""];



i'll keep this one open as before... thanks again.


Title: Re: a better view
Post by: savedbygrace on 27 Jul 2008, 14:30:33
This project would be more helpful if you could print the current viewdistance and terrain settings as well as provide seperate boxes for entering the data to change the settings, this way players can recall their mistakes. Or perhaps an undo button that would restore settings back to a default that was present before the ABV was opened. Can the info to accomplish this not be found within the files of the arma game? How does BIS retain those settings in the player profiles?
Title: Re: a better view
Post by: loki72 on 28 Jul 2008, 01:14:14
greetings,

yup... no.. i dunno.. maybe?!  lol.. version 1.2 will have that if i can figure out how to do it.
Title: Re: a better view
Post by: Spooner on 06 Aug 2008, 11:39:29
You can't ask for the current view settings, unless you use ArmALib (http://www.armaholic.com/page.php?id=3299). Your script could remember which setting it last used though and assume that nothing external has changed the setting.

Code: [Select]
class RscDisplayEmpty;
class RscDisplayMission : RscDisplayEmpty {
access = ReadAndWrite;
  idd=46;

onLoad="execVM ""\loki_dlg\init.sqf"";";
};
What you are doing is using the OnLoad event handler on the standard BIS Mission selection dialog. Whenever that display is loaded, then your script is run. Please, please, please don't use this method to start up your script. By using a BIS event handler like this, you are running the risk of overwriting someone else's use of it (perhaps BIS in the future?), or they could overwrite your use of it (e.g. since you presumably got this method from another addon, you are already incompatible with that addon!). Just use the de facto method, XEH (http://www.armaholic.com/page.php?id=2605), like everyone else should be doing, for 100% compatibility.

On another note, I think you should make clear that using this addon in MP games would be considered cheating, unless everyone agreed to use it. In COOP, you'd be able to see further than the opposing AI, since you aren't changing the server view distance; in PVP, you'd be able to see further than players on the other side.
Title: Re: a better view
Post by: loki72 on 07 Aug 2008, 11:01:02
greetings,

thanks spooner...

i still wasn't 'seeing' the anything with 'Rsc" is BiS stuff.

also i agree that a 'warning' should go along with this.

1.2 should be coming soon.
Title: Re: a better view
Post by: Killswitch on 09 Aug 2008, 04:15:15
Why all this fiddling with looping scripts and core game UI mangling?  :dunno:
Code: [Select]
class CfgPatches
{
    class loki_dlg
    {
        units[] ={};
        weapons[] ={};
        requiredAddons[] = {};
        requiredVersion  = 1.08;
        version          = 2.31;
    };
};
class CfgVehicles
{
    class Man;
    class CAManBase: Man
    {
        class UserActions
        {
            class Loki_ABV
            {
                displayName="> ABV";
                position="camera";
                radius=1;
                condition="(missionName=='')";
                statement="[] execVM '\loki_dlg\Scripts\ABV_Settings.sqf'";
                onlyForPlayer=1;
                showWindow=0;
            };
        };
    };
};

#include <\loki_dlg\Dialogs\Common\DialogColorConstants.hpp>
#include <\loki_dlg\Dialogs\DialogColorScheme.hpp>
#include <\loki_dlg\Dialogs\Common\DialogControlClasses.hpp>
#include <\loki_dlg\Dialogs\Common\settings.hpp>
Yeah?  :D
Title: Re: a better view
Post by: loki72 on 09 Aug 2008, 12:38:40
greetings,

@killswitch thanks for the reply...

Quote
Why all this fiddling with looping scripts and core game UI mangling?

honestly... i am a noob and have about a 10% idea what's going on with scripting. ::)

i tried your way.. and it worked, except, in MP...

i found that this works... even in warfare...

Code: [Select]
class CfgPatches
{
class loki_dlg
{
units[] ={};
weapons[] ={};
requiredAddons[] = {"Extended_Init_EventHandlers"};
requiredVersion  = 1.08;
version          = 2.31;
};
};

class Extended_Init_EventHandlers
{
class CAManBase
{

loki_dlginit = "if ((isNil ""loki_dlg"")) then { loki_dlg = true; [] execVM ""\loki_dlg\init.sqf""; }";
};
};

is this way bad?

Title: Re: a better view
Post by: Killswitch on 09 Aug 2008, 17:34:49
Yeah, I deliberately made the condition expression ensure it would only work in single player missions. Spooner touched on the subject before and I'll do it now - view distance and the ability to change it on the fly in multiplayer missions should be determined by the mission maker so as to make things fair for everyone. That said, changing the condition to make the thing work in MP would be simple, and is left as an exercise.

Quote
Code: [Select]
[... XEH solution ...]
is this way bad?
Not at all - that'll work just fine, too.  :good:
Title: Re: a better view
Post by: loki72 on 11 Aug 2008, 13:27:52
sry for the delay.. was gone for 2 days

@ killswitch.. thank you..   :)

i agree about the mission maker and view distance... to a degree...

i will add a disclaimer.. on the next release that ABV is a 'cheat' if no one else is using it.