1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. The results are out! Check them out.
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Idea] [system] (vJass) CustomMissle

Discussion in 'Triggers & Scripts' started by Anachron, Feb 3, 2010.

  1. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    It's not about variables, it's about modularity and extra functionality.

    I dunno where you learned how to code but having repeated chunks of code all over the map doesn't seem much "flexible" to me...

    Why do I make my suggestions? Because I am trying to add the "wc3c elitism" into this code. I have a fussy feeling that Anachron will, eventually, submit this to wc3c.net and we both know that without using their approved systems / libs this will be rejected, at the best (lets hope Griffen doesn't show up saying that this is an example on "how not to code").
    You obviously have no idea on what elitism is, so stick to your reviews and let the others do their own.

    Keep in mind I never said the code was bad or sucked balls. I am just being the regular asshole from wc3c.net saying that you need to use their stuff. Someone has to do it.
     
  2. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,167
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    Flame_Phoenix you should check about the CustomFilter thing that I've posted on wc3c.net.
    I noticed that I am not welcome on wc3c because I am not good enough at english and I can't really point out the pros for my systems, so I will stick around here.

    Also, the ARGB would only save my oneliner anyway, so it's to much code to be useful.
    (I currently have this:
    Code (vJASS):

    call cmd.colorARGB(a, r, g, b)
     
    )
     
  3. Slaydon

    Slaydon

    Joined:
    Jan 6, 2008
    Messages:
    2,432
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    Message to mods

    Would you rename this thread to Custom Missile

    ( I did this cuz )

     
  4. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    @Slaydon: Why not just simply PM a mod instead ? Isn't it easier and better? xD
     
  5. Berb

    Berb

    Joined:
    Jan 21, 2006
    Messages:
    2,539
    Resources:
    2
    JASS:
    2
    Resources:
    2
    Actually I suppose ARGB would fit nicely with this I just took another look at the ARGB implementation. Perhaps I should include it in mine.
     
  6. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    ARGB is, currently, the best colour / alpha library. There is a reason for that happening.
    Btw Berbanog, next time try to give the benefit of doubt to my suggestions instead of simply shooting them with sniper cat xD
     
  7. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,167
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    But it's just one line?! >.< And for that implementing a new system?
     
  8. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    You do realize that ARGB doesn't only allow you to change colors right?

    Code (vJASS):

    //******************************************************************************
    //*
    //* ARGB 1.2
    //* ====
    //*  For your color needs.
    //*  
    //*  An ARGB object is a by-value struct, this means that assigning copies the
    //* contents of the struct and that you don't have to use .destroy(), the
    //* downside is that you cannot assign its members (can't do set c.r= 123 )
    //*
    //*  This library should have plenty of uses, for example, if your spell involves
    //* some unit recoloring you can allow users to input the color in the config
    //* section as 0xAARRGGBB and you can then use this to decode that stuff.
    //*
    //* You can also easily merge two colors and make fading effects using ARGB.mix
    //*
    //* There's ARGB.fromPlayer which gets an ARGB object containing the player's
    //* color. Then you can use the previous utilities on it.
    //*
    //* The .str() instance method can recolor a string, and the recolorUnit method
    //* will apply the ARGB on a unit
    //*
    //* For other uses, you can use the .red, .green, .blue and .alpha members to get
    //* an ARGB object's color value (from 0 to 255).
    //*
    //* structs that have a recolor method that takes red,green,blue and alpha as 0.255
    //* integers can implement the ARGBrecolor module to gain an ability to quickly
    //* recolor using an ARGB object.
    //*
    //********************************************************************************

    //=================================================================================
     


    System:
    http://www.wc3c.net/showthread.php?t=101858&highlight=ARGB

    It was just a suggestion. If you don't think it is necessary, you don't need to add it.
     
  9. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,167
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    FP I know about ARGB about an half year now. I think you do not really need to tell me it's advantages and disadvantages since I've worked with it quite a while now.

    I may add it optionally, it will never be a requirement.
     
  10. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    Good decision.
     
  11. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,167
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    Any other feedback? :)
     
  12. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    Is your event handlers interface on the first page updated?
     
  13. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,167
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    Yes, I have just updated it today.
     
  14. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    You have a get missile speed method. Why?
    If you want to make it "java like" why not make :
    getOwner
    getTarget
    getX
    getY
    getZ
    getAngle

    and you should also not forget about the "setters" as well.
    I just don't get it, if you have a get for the speed, why not a get for everything else? Is the calculation of the move speed special?
     
  15. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,167
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    Can you please for GODS SAKE read the comments above the methods?
    getMissleSpeed() is thought to be modified so you can slow missles etc down.

    Everything else is without getter/setters because its ugly.
     
  16. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    read the part where it says that you will use it to slow the missile ?
    That is exactly my problem Anachron. It is common knowledge that "getter methods" should NOT affect the object itself. If you want to alter an object than you should create a "setter method" and not a getter. It is a programming principle used in all object oriented languages. I strongly recommend that you change that method.

    And please, keep in mind that I always read stuff before posting about them. There is no need to get touchy xD
     
  17. watermelon_1234

    watermelon_1234

    Joined:
    Nov 18, 2007
    Messages:
    1,066
    Resources:
    10
    Spells:
    9
    JASS:
    1
    Resources:
    10
    Is there a way to make a unit into missile? It's not completely needed for this system, though it does make it nicer if it can do this. (Sorry if there is and I didn't see it.)
     
  18. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,167
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    I don't understand the question.
    Convert a unit into a missile?

    What exactly do you want to do?
     
  19. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    Why not create the missile already instead of morphing a unit into one?
    I want you to fix getMissileSpeed and to be congruent. And yes, I know this was not directed to me, but I couldn't help myself reminding you :p
     
  20. Berb

    Berb

    Joined:
    Jan 21, 2006
    Messages:
    2,539
    Resources:
    2
    JASS:
    2
    Resources:
    2
    I don't see how this thread is getting so much damn activity while my actual submission has gotten absolutely no feedback. Maybe I should take it down from the submissions here and post it up at wc3c.