Jump to content
bad benson

PIP scope and daylight laser pointer source

Recommended Posts

hey guys,

since i've been asked for this quite a lot i will release my PIP scope/daylight laser pointer proof of concepts as can be seen in ace 3/agm.

 

for now it's just the PIP scope but i'll release the laser here too after i cleaned it up a little.

 

this is just a proof of concept so parallel work with other stuff and possible unknown issues are not accounted for.

 

 

my wish is that this thread can be used to share methods and and continue on improving the systems so we can as a community effort make this into the best thing we can. so if you come up with some improvements i, and i'm sure everyone else, would appreciate, if it was shown and shared here.

 

i will make my own version of all this into a proper addon at some point but for now i just wanted to share this so everyone that has been asking me for it can play around with it.

 

in this addon it replaces the SOS (classname "optic_SOS")

 

PIP SCOPE

 

https://www.sendspace.com/file/skfxzg

https://drive.google.com/file/d/0B5Y0VNgK9JXiOGNFVFJWbzBRY2M/view?usp=sharing

 

 

 

 

LAZOR

["babe_laser", "onEachFrame", {

if (currentVisionMode player == 1) exitwith {};

if (player isIRLaserOn currentWeapon player) then
{
    

    _lasercolour = [1,0,0,1.5-sunOrmoon]; // first 3 numbers are RGB

    _range = 250; // laser range

    _maxsize = 0.1; 

    _rwrist = (player selectionPosition "rwrist");
    _start = player modeltoworld [_rwrist select 0, (_rwrist select 1) + 0, (_rwrist select 2) + 0.1];

    _lstart = atltoasl(player modeltoworld _rwrist);

    _lend = (player weaponDirection currentWeapon player) vectorMultiply _range;

    _end = asltoatl(_lend vectoradd _lstart);

    _int = lineIntersectsSurfaces [atltoasl _start, atltoasl _end, player, objNull, true, 1, "GEOM", "NONE"];

    _endL = _end;

    _size = _maxsize;




    if (count _int > 0) then
    {
        _end = (_int select 0) select 0;
        _endL = asltoagl _end;

        _length = _lstart vectorDistance _end;

        systemchat str _length;

        if (_length >= _range) then
        {
            _size = 0
        } else
        {
            _size = _maxsize*_range/(_length);
        };
        if (_length < 1) then
        {
            _size = 0;
        };
    } else
    {
        _size = 0
    };

    drawLine3D [_start, _endL, _lasercolour]; // comment this out to remove the line

    drawIcon3D ["\a3\data_f\car_light_flare2.paa", _lasercolour, _endL, _size, _size, random 360, "", 0, 0.05, "PuristaMedium"];


};

}] call BIS_fnc_addStackedEventHandler;

screenshot: http://i.cubeupload.com/4XjluB.jpg

 

https://youtu.be/nMoMykeBoWo

  • Like 7
  • Thanks 3

Share this post


Link to post
Share on other sites

Awesome. Regarding your laser pointer, the only issue I found with it is that it showed up as a black line when using NvG's, which looked kinda Bizzare.

Share this post


Link to post
Share on other sites

Awesome. Regarding your laser pointer, the only issue I found with it is that it showed up as a black line when using NvG's, which looked kinda Bizzare.

 

hm. not sure what you mean. i didn't release anything. i just gave my proofs of concept for both things to AGM right before the ACE merger and then they carried it over to ACE. i'm not part of ACE in any other way. i'm sure the ACE guys made some changes to it already so you should probably report that to them.

 

@warlord: so you made a similar thing? not sure what you mean. if you have something feel free to share it here so we can discuss it. that was kind of the idea.

 

Share this post


Link to post
Share on other sites

hm. not sure what you mean. i didn't release anything. i just gave my proofs of concept for both things to AGM right before the ACE merger and then they carried it over to ACE. i'm not part of ACE in any other way. i'm sure the ACE guys made some changes to it already so you should probably report that to them.

 

@warlord: so you made a similar thing? not sure what you mean. if you have something feel free to share it here so we can discuss it. that was kind of the idea.

Alrighty, i'll check it out when i get the chance! Great stuff Btw.

Share this post


Link to post
Share on other sites

ok so here goes the laser.

 

http://i.cubeupload.com/4XjluB.jpg

 

i couldn't find my old one so i quickly threw together a new one. you can basically use this in your mission without any addons if you want. i just quickly made this work so there might be some idiocy in it :lol: again, feel free to improve upon it and share your progress here.

 

i'm gonna add this to the first post too.

 

laser colour and image can be easily changed ofc. it's just a proof of concept for demonstration. same goes for the line and the fact that the laser is less pronounced during daytime. i had the line in there just for debug but found it looked kinda cool.

 

little side note on the oneachframe method. if you use this in your addon, make sure to account for others doing the same. i'd love for this to be insdie something like joint rails as an option for people to use (same as PIP) so there's something a bit more central to avoid code running more than once.

 

 

i also started working on a "real" laser that exists in the 3d world. i'm obsessed with having this work in MP. i know it's probably not the wisest thing to do but i gotta do it :lol: going to share here once i got something.

 

 

EDIT: made some improvements. check first post

  • Like 1

Share this post


Link to post
Share on other sites

sorry for the double post.

 

added a video for the laser and made some more improvements and a few comments to the code. removed shadow from the drawicon3d (duh!).

i think will link the visibility of the laser line to amount of rain and fog (amount of reflection particles basically) later.

 

also added a video showcasing the laser in motion (check first post).

Share this post


Link to post
Share on other sites

Very nice man!

 

Very good idea to center all the discussion in this forum, and thank you very much for the addon, so that the community can try and bring some comments and ideas.

 

Now I´ll try my shots!

 

Keep it up!

  • Like 1

Share this post


Link to post
Share on other sites

Hi. The pip scope file is deleted. Can you upload it again?

Thanks.

Share this post


Link to post
Share on other sites

Thanks for sharing Bad Benson! Wonderful script. The PIP scope they way you do it, is in my view the right way to do it: with PIP outside the scope, not on the inside.

Like MSB said, the downloadlink is no longer active. Maybe you could upload it to Armaholic to secure this script and addon for future download?

Share this post


Link to post
Share on other sites

Upload it again, please. Your PIP concecpt is great. You may included it in your AEM like the laser you did.

Share this post


Link to post
Share on other sites

Hi Benson.Is it possible add  init code from Ace  Fire Control Systems ..It is not aimbot and has long been existing technology.Special scope with laser designator and auto zero function.tracking-point-frontal-view-22.jpg

Share this post


Link to post
Share on other sites

links are dead? let me know if it got totally lost and i'll reupload. just want confirmation.

Share this post


Link to post
Share on other sites

Yeah when I click it, I see this:
 

 
Sorry, the file you requested is not available.

Possible reasons include: 

- File date limit has expired. 
- File was not successfully uploaded. 

It is not possible to restore the file. Please contact the uploader and ask them to upload the file again. 

 

 

Share this post


Link to post
Share on other sites

ok thx. also. you have the files don't you? if so, please upload them and post the link here because that would save me from having to create a clean version again. i made a lot of experiments since i made this thread so my files aren't really "clean". that goes for anyone who has the files from me first posting here.

i will let foxhound know so he can upload them on armaholic. ofc i can make a clean version if needed but i would prefer not having to hunt down old files and stuff. so thx in advance.

Share this post


Link to post
Share on other sites

Yeah sorry, I tried looking but think I lost my copy along with some old astfor stuff during a drive shuffling, otherwise I would have uploaded my copy. Sorry. :\

Share this post


Link to post
Share on other sites

is that the original? that would be great!

 

i was going to update this possibly in the future. so this is great. thx!

 

i will also upload this to my google drive now. should stay up instead of disappearing over time.

 

https://drive.google.com/file/d/0B5Y0VNgK9JXiOGNFVFJWbzBRY2M/view?usp=sharing

 

adding this to the first post too.

  • Like 1

Share this post


Link to post
Share on other sites

After I decided to move on with my scopes mod in 2D I have not checked your PIP scopes any more, so I don´t know if those files are the most recent releases :)

Share this post


Link to post
Share on other sites

a small problem. there's no optic named SOS in the game anymore. the one that used to be SOS has been renamed as MOS, it also has a new class name "item_optic_SOS".

 

I assume that if I wanted to get this mod to run I'd have to replace the class name somewhere in the config file(s), correct?

Share this post


Link to post
Share on other sites

yes.

 

i've been planning for a while to convert all vanilla scopes to this tech. but it's a lot of repetitive work so i didn't have the inspiration yet. but i will definately convert my most used ones soon.

 

but yea. you can do that yourself too.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×