Page 5 of 5 FirstFirst 12345
Results 41 to 48 of 48

  Click here to go to the first Developer post in this thread.  

Thread: Arma 2 Forward Compatibility

  1. #41
    in ArmA 2 namespaces will be introduced for user scripts and variables. There are many low level reasons to do this and most of the content will be not be affected by this in any negative way. However, in order to be prepared, it is very important to separate UI related scripts and code as much as possible and not simply share global variables between UI and missions as UI namespace needs to be handled differently.
    Any ideas what this means exactly. Will we still be able to interact with our own dialogs and scripts/objects running in game, in real time?

  2. #42
    Any ideas what this means exactly. Will we still be able to interact with our own dialogs and scripts/objects running in game, in real time?
    As far I understand it, short answer "yes".
    Considering your scripting work so far I assume you are familiar with the general concept of namespaces in programming.
    Now it seems that you will no longer be able to directly manipulate global variables in your UI scripts from mission (/addon?) scripts and vice versa. I suspect you would have to do something like let's say invoke a UI function with parameters you would like to have manipulated, this UI script would then be able to manipulate UI global variables.
    For example:
    Let SCH_GLOBAL_STRING be a global variable in UI namespace.
    Now invoking the follwing command from mission namespace would not work
    Code:
    SCH_GLOBAL_STRING = "Some text"
    Now let "setText.sqf" be the following UI script:
    Code:
    SCH_GLOBAL_STRING = _this
    You could then manipulate UI namespace variable with
    Code:
    "Some text" call compile loadFile "setText.sqf"
    I could be completly wrong here, of course
    If I am not, I hope there will be a more elegant way to do this (if not, you will probably be able to work one out yourself)

  3. #43
    Master Gunnery Sergeant
    Join Date
    Dec 13 2003
    Location
    Melbourne, Australia
    Posts
    1,362
    Any official word on what this namespaces will actually entail; any chance BIS could ease our minds and give us a small example? Come on Ondrej! :P

    Australian Armed Forces - Dedicated Tactical Coop Squad for ArmA2

  4. #44
    Yes, please my Javelin uses loads of Dialog/UI stuff...

  5. #45
    I'm guessing the UI namespace relates to the UI event handlers mainly, which are strings. (eg: MouseButtonDown, LBListSelChanged, Action, etc).

    But I'm guessing if you execute a script from those EH's, then those scripts will still have access to global variables, so long as they are not passed in as parameters, so you would simply need to move your processing logic into there.

    This would then encourage you to use the control which is already passed via the parameters too.

    Maybe they are expanding the ability to use nested dialogs or are providing access to certain Arma dialog's (eg: main menu(/action menu), scoreboard, etc)

  6. #46

  7. #47
    I'm guessing the UI namespace relates to the UI event handlers mainly, which are strings. (eg: MouseButtonDown, LBListSelChanged, Action, etc).
    In retrospect, I figure there must be some interaction allowed. Otherwise there is no point in having dialogs, if you can't do anything with them.

  8. #48
    Please dont spam our forums here, if you have nothing to contribute or any problem,
    or idea that you need help on then dont say anything at all.

    Hosting Missions for Invasion-1944, Iron Front: Liberation 1944, & Hell in the Pacific

    WarMod Series - Massive Addon & Mod Customizable Compilation Mods for Arma1, Arma2, & Arma2CO
    WarMod | A2WarMod |A2WarModACE | COWarMod | COWarModACE | COWarModI44 |COSLX

Page 5 of 5 FirstFirst 12345

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •