Results 1 to 7 of 7
  1. #1
    Zolmex's Avatar
    Join Date
    Apr 2016
    Gender
    male
    Location
    on my chair
    Posts
    356
    Reputation
    94
    Thanks
    210

    Projectile Outlines (the correct way)

    So I see all of the current servers using projectile outlines yoinked from valor source, I used it myself too until couple weeks ago when I figured out the "correct" way to do it.
    Worth to say the only reason I was able to figure this out is because I knew it could be done, since RotF did the outlines correctly.

    -Go to Parameters.as (com.assembleegameclient.parameters).
    Add this line if you haven't:
    Code:
    setDefault("projOutline", false);
    -Go to Options.as (com.assembleegameclient.ui.options)
    go to addGraphicOptions, or in some other function where you add options, your choice.
    and add this line
    Code:
    this.addOptionAndPosition(new ChoiceOption("projOutline", makeOnOffLabels(), [true, false], "Projectile Outlines", "Toggles outlines on projectiles", null));
    -Go to Projectile.as (com.assembleegameclient.objects).
    above this
    Code:
    public function Projectile() {
    add this line
    Code:
    private var size:int;
    then go to the reset function, replace this
    Code:
    if (this.projProps_.size_ >= 0) {
                _local11 = this.projProps_.size_;
            }
            else {
                _local11 = ObjectLibrary.getSizeFromType(this.containerType_);
            }
            this.p_.setSize((8 * (_local11 / 100)));
    with this
    Code:
    if (this.projProps_.size_ > 0) {
                this.size = this.projProps_.size_;
            }
            else {
                this.size = ObjectLibrary.getSizeFromType(this.containerType_);
            }
            this.p_.setSize(8 * (this.size / 100));
            if (this.texture_.width >= 16)
                this.size /= this.texture_.width / 8;
    now scroll down until you see this
    Code:
    override public function draw(_arg1:Vector.<IGraphicsData>, _arg2:Camera, _arg3:int):void {
     

    replace this
    Code:
    if (Parameters.projColorType_ != 0) {
               switch (Parameters.projColorType_) {
                    case 1:
                        _local6 = 16777100;
                        _local7 = 0xFFFFFF;
                        break;
                    case 2:
                        _local6 = 16777100;
                        _local7 = 16777100;
                        break;
                    case 3:
                        _local6 = 0xFF0000;
                        _local7 = 0xFF0000;
                        break;
                    case 4:
                        _local6 = 0xFF;
                        _local7 = 0xFF;
                        break;
                    case 5:
                        _local6 = 0xFFFFFF;
                        _local7 = 0xFFFFFF;
                        break;
                    case 6:
                        _local6 = 0;
                        _local7 = 0;
                        break;
                }
                _local4 = TextureRedrawer.redraw(_local4, 120, true, _local7);
            }

    OR if you are already using valor's projectile outline
    replace this
    Code:
    if (Parameters.data_.projectileOutline) {
               var size:Number = (this.projProps_.size_ >= 0 ? this.projProps_.size_
                                : ObjectLibrary.getSizeFromType(this.containerType_)) * 8;
                _local4 = TextureRedrawer.redraw(_local4, size, true, 0, true, 5, 18 * (size / 800));
            }
    with this
    Code:
    if (Parameters.data_.projOutline) {
                   _local4 = TextureRedrawer.redraw(_local4, this.size, true, 0);
            }
    now, go to Point3D.as (com.assembleegameclient.engine3d)
    find these lines
    Code:
    _local12.scale(((2 * _local9) / _arg6.width), ((2 * _local9) / _arg6.height));
    _local12.translate(-(_local9), -(_local9));
    and replace them with this
    Code:
    if (!Parameters.data_.projOutline) {
                    _local12.scale(2 * _local9 / _arg6.width, 2 * _local9 / _arg6.height);
                    _local12.translate(-_local9, -_local9);
                }
                else{
                    _local12.translate(-(_arg6.width / 2), -(_arg6.height / 2));
                }
    and that's it
    Last edited by Zolmex; 07-27-2020 at 08:57 AM.
    hi

  2. The Following 4 Users Say Thank You to Zolmex For This Useful Post:

    Kate (07-27-2020),majster2277 (08-14-2020),RotumNR (08-01-2020),SBisEPIC (08-10-2020)

  3. #2
    majster2277's Avatar
    Join Date
    Jul 2020
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by Zolmex View Post
    So I see all of the current servers using projectile outlines yoinked from valor source, I used it myself too until couple weeks ago when I figured out the "correct" way to do it.
    Worth to say the only reason I was able to figure this out is because I knew it could be done, since RotF did the outlines correctly.

    -Go to Parameters.as (com.assembleegameclient.parameters).
    Add this line if you haven't:
    Code:
    setDefault("projOutline", false);
    -Go to Options.as (com.assembleegameclient.ui.options)
    go to addGraphicOptions, or in some other function where you add options, your choice.
    and add this line
    Code:
    this.addOptionAndPosition(new ChoiceOption("projOutline", makeOnOffLabels(), [true, false], "Projectile Outlines", "Toggles outlines on projectiles", null));
    -Go to Projectile.as (com.assembleegameclient.objects).
    above this
    Code:
    public function Projectile() {
    add this line
    Code:
    private var size:int;
    then go to the reset function, replace this
    Code:
    if (this.projProps_.size_ >= 0) {
                _local11 = this.projProps_.size_;
            }
            else {
                _local11 = ObjectLibrary.getSizeFromType(this.containerType_);
            }
            this.p_.setSize((8 * (_local11 / 100)));
    with this
    Code:
    if (this.projProps_.size_ > 0) {
                this.size = this.projProps_.size_;
            }
            else {
                this.size = ObjectLibrary.getSizeFromType(this.containerType_);
            }
            this.p_.setSize(8 * (this.size / 100));
            if (this.texture_.width >= 16)
                this.size /= this.texture_.width / 8;
    now scroll down until you see this
    Code:
    override public function draw(_arg1:Vector.<IGraphicsData>, _arg2:Camera, _arg3:int):void {
     

    replace this
    Code:
    if (Parameters.projColorType_ != 0) {
               switch (Parameters.projColorType_) {
                    case 1:
                        _local6 = 16777100;
                        _local7 = 0xFFFFFF;
                        break;
                    case 2:
                        _local6 = 16777100;
                        _local7 = 16777100;
                        break;
                    case 3:
                        _local6 = 0xFF0000;
                        _local7 = 0xFF0000;
                        break;
                    case 4:
                        _local6 = 0xFF;
                        _local7 = 0xFF;
                        break;
                    case 5:
                        _local6 = 0xFFFFFF;
                        _local7 = 0xFFFFFF;
                        break;
                    case 6:
                        _local6 = 0;
                        _local7 = 0;
                        break;
                }
                _local4 = TextureRedrawer.redraw(_local4, 120, true, _local7);
            }

    OR if you are already using valor's projectile outline
    replace this
    Code:
    if (Parameters.data_.projectileOutline) {
               var size:Number = (this.projProps_.size_ >= 0 ? this.projProps_.size_
                                : ObjectLibrary.getSizeFromType(this.containerType_)) * 8;
                _local4 = TextureRedrawer.redraw(_local4, size, true, 0, true, 5, 18 * (size / 800));
            }
    with this
    Code:
    if (Parameters.data_.projOutline) {
                   _local4 = TextureRedrawer.redraw(_local4, this.size, true, 0);
            }
    now, go to Point3D.as (com.assembleegameclient.engine3d)
    find these lines
    Code:
    _local12.scale(((2 * _local9) / _arg6.width), ((2 * _local9) / _arg6.height));
    _local12.translate(-(_local9), -(_local9));
    and replace them with this
    Code:
    if (!Parameters.data_.projOutline) {
                    _local12.scale(2 * _local9 / _arg6.width, 2 * _local9 / _arg6.height);
                    _local12.translate(-_local9, -_local9);
                }
                else{
                    _local12.translate(-(_arg6.width / 2), -(_arg6.height / 2));
                }
    and that's it
    FIXED ok thanks
    Last edited by majster2277; 08-09-2020 at 05:46 AM.

  4. #3
    FlutterM4rk's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    365
    Reputation
    16
    Thanks
    228
    My Mood
    Sleepy
    care to explain what you meant by 'the correct way'? this is just as convoluted if not more than valor's solution, literally just call p3d's (this.p_) size in draw() and work off that. also, the scaling outline width was omitted, meaning large projectiles will look less outlined in comparison to small ones (small ones could go as far as 50% black, meanwhile large ones can go as low as 5% black, it makes them look disproportionate together)

  5. #4
    Zolmex's Avatar
    Join Date
    Apr 2016
    Gender
    male
    Location
    on my chair
    Posts
    356
    Reputation
    94
    Thanks
    210
    Quote Originally Posted by FlutterM4rk View Post
    care to explain what you meant by 'the correct way'? this is just as convoluted if not more than valor's solution, literally just call p3d's (this.p_) size in draw() and work off that. also, the scaling outline width was omitted, meaning large projectiles will look less outlined in comparison to small ones (small ones could go as far as 50% black, meanwhile large ones can go as low as 5% black, it makes them look disproportionate together)
    probably shouldn't have called it the "correct way", but this way you get outlines with the glow/shadow around it, like on "regular sprites" that go through GlowRedrawer.outlineGlow. Which is what I was looking for.

    as to scaling the outline width, if that happens, I haven't noticed it or anything like it in the 3 weeks I've used this.
    hi

  6. #5
    SBisEPIC's Avatar
    Join Date
    May 2017
    Gender
    male
    Posts
    43
    Reputation
    10
    Thanks
    6
    My Mood
    Lurking
    In Projectile.as
    Unresolved variable or type _local4

    and in Point3D.as
    Unresolved variable or type Parameters


    When I attempt to rebuild, I get
    Error64, 18) [Valor]: Error code: 1120: Access of undefined property Parameters.
    I'm not sure how to fix
    Last edited by SBisEPIC; 08-10-2020 at 01:59 PM.

  7. #6
    Zolmex's Avatar
    Join Date
    Apr 2016
    Gender
    male
    Location
    on my chair
    Posts
    356
    Reputation
    94
    Thanks
    210
    Quote Originally Posted by SBisEPIC View Post
    In Projectile.as
    Unresolved variable or type _local4

    and in Point3D.as
    Unresolved variable or type Parameters


    When I attempt to rebuild, I get
    Error64, 18) [Valor]: Error code: 1120: Access of undefined property Parameters.
    I'm not sure how to fix
    I skipped a step at the end because I thought it obvious but it clearly wasn't.
    Anyway you have to add
    Code:
    import com.company.assembleegameclient.parameters.Parameters;
    at the beginning of the file (after "package com.company.assembleegameclient.engine3d")
    hi

  8. The Following User Says Thank You to Zolmex For This Useful Post:

    SBisEPIC (08-11-2020)

  9. #7
    SBisEPIC's Avatar
    Join Date
    May 2017
    Gender
    male
    Posts
    43
    Reputation
    10
    Thanks
    6
    My Mood
    Lurking
    edit: nevermind i fixed it, thanks for the help
    Last edited by SBisEPIC; 08-11-2020 at 01:19 AM.

Similar Threads

  1. [WTS] [E-BOOK] How To E-WHORE The Correct Way! [Easy Way!]
    By lkmking123 in forum Selling Accounts/Keys/Items
    Replies: 0
    Last Post: 03-24-2013, 11:33 AM
  2. Replies: 7
    Last Post: 01-16-2013, 07:12 AM
  3. how to play combat arms the correct way..
    By spsp31 in forum Combat Arms Discussions
    Replies: 12
    Last Post: 12-02-2011, 09:41 PM
  4. [Tutorial] Bitmap images: the correct way
    By ³²³ in forum Visual Basic Programming
    Replies: 7
    Last Post: 03-30-2011, 01:27 PM
  5. [Tutorial] The Correct Way To Clan Advratise - Sticky This?
    By jacob19999 in forum Combat Arms Clan Recruitment & Advertising
    Replies: 3
    Last Post: 12-22-2009, 03:31 PM