Adding Intel to a unit

  1. ‹ Older
  2. 7 years ago

    I actually forgot a small bit, here is the fixed version.

    _object addAction ["Read Intel", {_params = _this select 3; openmap true; [_params select 0, 1500, _params select 1] call ALiVE_fnc_OPCOMToggleInstallations}, [getPos _obj, side _obj], 1, false, true, "", "alive _target"];

    I added [position_obj, side _obj]

    Position is just the position to grab nearby installations from and side is just the asymmetric side

  3. Edited 7 years ago by HeroesandvillainsOS

    So where does this go? In the init of a document (or any object)?

    Which then I assume has a "Read Intel" add action which will reveal an installation?

  4. Curious about this one too... Does it go in a object or civilian maybe?

  5. If you don't know how to script it's easiest to put it on a unit. If you do, replace all instances of _obj with the word: this

  6. hi wang, if you are interested to test your missions on a server i would like to provide a test environment. im looking for alive mission makers to brainstorm. feel free to contact me @: chrisrau79@web.de

  7. Edited 7 years ago by HeroesandvillainsOS

    @SpyderBlack723 I actually forgot a small bit, here is the fixed version.

    _object addAction ["Read Intel", {_params = _this select 3; openmap true; [_params select 0, 1500, _params select 1] call ALiVE_fnc_OPCOMToggleInstallations}, [getPos _obj, side _obj], 1, false, true, "", "alive _target"];

    I added [position_obj, side _obj]

    Position is just the position to grab nearby installations from and side is just the asymmetric side

    @SpyderBlack723

    Sorry for the bump. This goes in the object init line in the editor and will reveal objectives in the same manner as the new Intel on dead bodies system?

    I'm just looking for clarification for where to put the code.

  8. This is for adding intel to individual units, if you use it in an init line for a unit, replace all instances of _object with this

  9. Edited 7 years ago by HeroesandvillainsOS

    Ah ok. Bummer. Do you know how I can I add Intel to an object (I'm thinking something like adding it to a "secret document")?

    EDIT: Wait. I'm assuming what you said was a typo. I'd replace "_object" with "this" for adding Intel to a physical object, correct? That would make sense.

    You said "init line of a unit" but I'm pretty sure you meant "init line of an object." Am I right on that?

  10. yes, sorry.

    One minor change you need you make if using an object is replace side _obj with the side of the asymmetric opcom.

    ex.

    side _obj --> "EAST"
    side _obj --> "WEST"
    side _obj --> "GUER"

  11. Thanks!

  12. So this is what I added to the init line of an object but I think I got the syntax is wrong:

    this addAction ["Read Intel", {_params = _this select 3; openmap true; [_params select 0, 1500, _params select 1] call ALiVE_fnc_OPCOMToggleInstallations}, [getPos _obj, "EAST"], 1, false, true, "", "alive _target"];

    The error is "Local variable in global space"

  13. Edited 7 years ago by SpyderBlack723
    getPos _obj

    |
    |
    v

    getPos this
  14. Edited 7 years ago by HeroesandvillainsOS

    Lol. It's like I don't even read what you write. :(

    Sorry. You made that pretty clear earlier. I appreciate the clarification.

  15. Edited 7 years ago by HeroesandvillainsOS
    this addAction ["Read Intel", {_params = _this select 3; openmap true; [_params select 0, 1500, _params select 1] call ALiVE_fnc_OPCOMToggleInstallations}, [getPos this, "EAST"], 1, false, true, "", "alive _target"];

    Ok. Cool. Well 50/50 cool. This code is accepted as valid in the editor. However, interacting with an item having this in its init in game results in a toggle installations generic error in expression message. And no intel is revealed.This would actually be the same error I had when the intel on dead bodies feature was first introduced into ALiVE itself..

    Not that it matters much. BIS has hard-coded this obnoxious "Take Intel" add-action on intel documents that shows up much further in the mousewheel options than ALiVE's "Read Intel" option. Why on earth would BIS have an interaction like this when it doesn't do anything unless you script it to?

    I honestly have no clue how you guys were able to bypass the generic "Take Intel" add-action. Don't you use intel documents near the dead bodies, similar to the ones I would find in the editor?

  16. ["Land_File1_F","Land_FilePhotos_F","Land_File2_F","Land_File_research_F"]

  17. Edited 7 years ago by HeroesandvillainsOS

    Thanks.

    Any idea why it the code I'm using doesn't reveal installations and just shoots a toggle installations generic error in expression message?

    That couldn't be tied to which objects I was using, could it?

  18. Could you post Rpt, probably something simple I messed up

  19. https://www.dropbox.com/s/fk1zux5b6zr967k/arma3_2016-06-25_21-21-30.rpt?dl=0

    Sorry, the rpt file was just barely too long for a paste. Let me know if you need the error I see in game.

  20. Edited 7 years ago by SpyderBlack723

    Ah, tricky HH

    Just change

    [getPos this, "EAST"]

    to

    [getPos this, EAST]
  21. Edited 7 years ago by HeroesandvillainsOS

    Thanks!

 

or Sign Up to reply!