Intel on dead bodies or in buildings

  1. ‹ Older
  2. 8 years ago
    Edited 8 years ago by HeroesandvillainsOS

    I just wanted to cross post this. Here's an error report Davidoss generated for me which shows what seems to me a bunch of errors regarding the newest script in this thread, along with some other ALiVE/SpyderAddons related ones.

    http://pastebin.com/JW3vZSPr

  3. Edited 8 years ago by incontinenetia

    I did notice an error like that pop up but it's way over my head. I've tried a few ways to get rid of it but with no success, doesn't seem to affect how the script works though.

    Edit: also, thanks for the kind words! Unfortunately until BIS sort their sht out with the action menu, finicky will have to do.

  4. Edited 8 years ago by HeroesandvillainsOS

    It was explained to me like this. Way over my head too! LOL!

    "These (the errors) are caused by scripts, especially due to how they are executed. If the script contains in his code any suspend command like sleep, waituntil, sleepUI and other it cant be called. You need to spawn it. Spawned code running in scheduled environment and only there you can suspend executing the code."

    Basically, in the Intel/fnc_handleKilled.sqf he's saying you need to use "spawn" instead of "call." I think! :)

    Yeah. I know. It's all a foreign language to me. I was asked not to share the PM I got from him unless I generated a full report myself. Seeing as you generated your own, I can PM it to you on BIS if you want. He included some nifty links that may be useful.

  5. Edited 8 years ago by HeroesandvillainsOS

    PM sent. Yeah I agree I haven't seen it cause issues or crashes or anything. The same goes with Spyder's and ALiVE's errors too. Just a heads up more than anything especially if we start having problems.

  6. Yeah any suspension type commands like sleep,uisleep,wait until need to have the file or function they are in executed with spawn or execVM. Spawn for functions and execVM for files.

  7. Cheers both, I've updated the link with a version with no sleep commands. The mark units function has a waituntil command but that is called within the script using spawn, so I'm guessing that's alright?

  8. Can't check it atm but yes, that sounds fine.

  9. Edited 8 years ago by HeroesandvillainsOS

    Awesome. I'll give it a spin later. Thanks for the quick update!

  10. @SpyderBlack723, I'm just doing a rehash of this now that I know a tiny little bit more about scripting and was wondering if you still had that function to find the nearest 3 asym OPCOM installations kicking around? No worries if not!

  11. Edited 8 years ago by SpyderBlack723

    You poked me at the wrong time! Going back to the land of no internet for a few days, but when I get back I'll see what I can whip up.

    Prereq. Details

    Do you want ANY 3 asymm installations or 3 belonging to a specific faction?

  12. Haha sorry about that. 3 of any asym installations, although of a specific faction would be cool but only if you have it kicking about. And absolutely no rush!

    I hit a block while digging through ALIVE_fnc_OPCOMToggleInstallations or whatever it's called and can't work out why it's showing ALL objectives and not just installations like it did a couple of versions back. Think I need to learn a bit more...

  13. I can get you a code that you can place in an object init to reveal Intel if you want but it won't be until much later. Not sure if that will contain the code you need for whatever you're working on but if you want it, I can get it to you.

  14. Edited 8 years ago by incontinenetia

    Yeah that sounds great if you could? Thanks @HeroesandvillainsOS!

    Edit: Do you mean all intel within a certain radius or just specific asym installations?

  15. Edited 8 years ago by HeroesandvillainsOS

    I actually just found the thread the code is posted in. Be sure to read to the bottom because Spyder clarified a few things for me to get it to work the way I wanted.

    http://alivemod.com/forum/2115-adding-intel-to-a-unit/13#p13192

    It basically reveals the same Intel you'd get from a CIV or an intel object near a dead body, but you can add the code to a specific object or unit. I use it to spice my missions up with custom compounds and to encourage exploring. The radius does seem relatively small in comparison to ALiVE's integrated intel system though.

    Not sure if this can get you started or not but figured I'd help out just incase. I'm still looking forward to your mission! :)

  16. Edited 8 years ago by incontinenetia

    Thanks buddy. This this is what I'm already working with I think. It reveals all OPCOM objectives in the given radius right?

    I'm hoping to only reveal 1 or 2 at a time without showing civ and military objectives. I'll work it out sooner or later I'm sure! Just remembered Spyder posting something that did just that a while ago.

  17. Yeah that's exactly what it does and as you suspected, it also reveals the mil/civ obj's too. That's a neat idea just limiting it to installations.

  18. Try this.

    https://gist.github.com/SpyderBlack723/ea8395a4b644b0b1c79dd7c72dd9bf5c

    Untested

  19. Edited 8 years ago by incontinenetia

    Thank you Spyder! I'll give it a shot.

    Edit: It works! (With one tweak I think, on line 49:

    if ((count _installations < _maxInstallations) && {!(_x isEqualTo [])}) then {

    - was missing "then").

    Thanks again Spyder! I'll get this set up with some markers and share it with the full intel package if that's okay (with credit of course!)?

  20. Edited 8 years ago by SpyderBlack723

    Too much C++ :/

    Glad it works

    (And if you haven't noticed yet it returns the actual installation objects, so use getPos on the returned array entries to get their position)

  21. Thanks buddy. Yup, took me a minute or two to figure that out but just putting the final touches on it now and the markers are working fine too. Cheers for all your help!

  22. Newer ›
 

or Sign Up to reply!