• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!
Vinz
Reaction score
5,506

Profile posts Latest activity Postings Experience Albums Resources About Medals

  • Oh I'm great, just preparing for school and making Breakfast, Thanks for asking :). By the way why was your VM disabled? And where did your delicious avatar go? •0• *why are you Sad :(?*

    *no wait there's the delicious avatar*
    thx,im not gonna release it yet...
    it needs alot of things to be added.gotta upgrade the trolling system too,tho i kinda call it a response system,LOL!
    The only thing I typed on chat was the *first line, the other lines were falsified. Dunno if you would believe me though.

    This line: [16-37-21] chobibo: Heinvers, is CM still in a bad mood? He re-enabled his vm
    Yeah.i made the linkgen already,just wanted to add some edits before upload...
    i can give you pre release if you want.
    [16-37-21] chobibo: Heinvers, is CM still in a bad mood? He re-enabled his vm
    [16-37-34] [IMG] chobibo: Heinvers, also tell CM I didn't write this
    [16-37-52] [IMG] chobibo: Heinvers, welp
    [16-39-11] [IMG] chobibo: Heinvers, I don't know
    [16-40-22] [IMG] chobibo: Heinvers, Pls?
    Too much busy with projects and such. Can't literally do much here. I'll be fully back maybe after a week or such.
    Hey I made a thread, It's about if there's any insect/ animal you don't like/are afraid of and if you try to get rid of them or have any habit to actively avoid them.
    Ah this tutorial ^^
    Yep it really removes the variable from the existence :D
    But it is absolutely NEEDED :)

    <name> in your example is the name of the variable.
    When you use <name>.<something> you access the member called <something> of the struct variable <name>
    Members of a struct variable are variables (in my Point example it is x or y) but can also be methods.

    What is a method ?
    A method is a function specific to a struct.
    There is two different types of method :
    - Static method -> They work EXACTLY THE SAME AS FUNCTIONS.
    Example :
    struct Point
    real x
    real y

    //I create my own create method for the variable type Point
    static method create takes nothing returns Point
    local Point p = Point.allocate() //I create a Point with uninitialized coordinates
    set p.x = 42
    set p.y = 27
    return p
    endmethod
    endstruct

    //In random func
    function RandomFunc takes nothing returns nothing
    local Point p = Point.create() //To call static method : <TypeName>.<methodName>
    call BJDebugMsg(R2S(p.x)) //This will display 42
    call p.destroy()
    endfunction

    Basically JASSHelper generates create/allocate (it is the same) and destroy/deallocate (same there).
    But you can create more.


    - Non static methods : Those methods takes automatically a struct variable as parameters.
    Example :
    struct Point
    real x
    real y

    method troll takes nothing returns nothing
    set this.x = 42 //To refer to the implicit parameters use this
    set this.y = 27
    //No need to return -> The changes are automatic.
    endmethod
    endstruct


    //In random func :
    function RandomFunc takes nothing returns nothing
    local Point p = Point.create()
    call p.troll() //To call non static methods : <nameOfTheVar>.<nameOfMethod>
    call BJDebugMsg(p.x) //This will display 42
    endfunction



    Now some tricks :
    - When you're inside the struct, you can refer to the name of the struct by using thistype :
    struct OmgMyNameIsTooLongItWillBeSoBoringToTypeItEverywhereXD
    real x
    real y

    static method create takes nothing returns thistype
    local thistype this = thistype.allocate()
    ...
    return this
    endmethod
    endstruct
    Here I use this for nothing, it is just the name of the variable.
    But it is syntax highlighted :D
    I dunno about groups, I think you need to ask the admins or Ralle if you start a group the first time.
    Keep calm and pick your nose. One day you will understand. I hope. BTW, I didn't refuse to answer, look closer/deeper/wtv and you'll find the answer.
    Yeah, that sounds like a good way to get kicked out. It's no good if im doing obvious trolls, it's much more preferred to write contradicting posts that appear somewhat serious at least.
    Yeah, though I think somewhere on the chaser's skill tree are some seriously badass chain skills. I really find the chain theme cool. BTW, what are you planning to be in the second job advancement? Raven or Ripper?
    A struct is a new variable type.

    struct Point
    //Declare what should have your struct, for a point we have the x and the y
    real x
    real y
    endstruct

    Then if you want to use this struct :
    private MyFuncIsCool takes nothing returns nothing
    local Point p = Point.create()
    set p.x = 42
    set p.y = 27
    //Do stuff....
    call p.destroy() //NEVER EVER FORGET THIS
    endfunction

    What tut ?
    If he'll continue to complain too much, his requests will be ignored. Whoever would take his requests after that will be dismissed.
    Reputation (+1):
    (Post) I love you because you are sweet and i like sweet people, Unless i taste them.
    ----------
    Dead,

    This is a message inviting you to the Cake Crusade. Join the evul crusaders as they crush the world beneath their might!

    Insincerely, the MasterCake.
    ----------
    What is this? To war!
    ... okay, that ain't cool bro... :( You can insult me but don't include them boobies.
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
Top