Reaction score

Profile posts Latest activity Postings Experience Resources About

  • Hey, for some reason I cannot send private messages. I've replied to you several days ago but I don't see anything in my "Sent" box. Add me on Steam if you want to continue our conversation.
    Yeah I'm a bit away those days ;)
    Anyway it's cool for you first spell :)
    I'm glad to see one of my student do something pretty nice and to see things that I have taught to you :D
    So based on your explanation, the second one is no good?
    The second one can be good if you destroy the struct before the end of the func and if you don't need the struct instance anymore.

    Infact create and allocate are the same. But in the tutorial I redefined the create method so to create an instance inside the struct I have to call the allocate :)
    But outside I want to use my create function which does more thing than the allocate function only.

    Linked list isn't that much useful.
    And btw Mag is a fan of extends array so don't really care of this until you fully understand :p
    Just saw your last thread :
    To explain better :
    In your first method you init your struct instance and then you return it and so you can do the work in the function which called the create method.

    In your second method you init your struct instance and then you do some stuff and at least you don't return your struct instance.
    So -> If you do this way you will lost the pointer to your struct instance. Infact it will be lost in the desert plains of vJASS XD !
    And more you will not be able to destroy it and so you will have an index non used anymore ^^
    Oh yes it leaks ^^'

    I've an idea to pick a random unit on a group.

    local group g = CreateGroup()
    local unit u
    local unit array data
    local integer index = 0
    //Pick your group
    set u = FirstOfGroup(g)
    exitwhen u == null
    call GroupRemoveUnit(g,u)
    set data[index] = u
    set index = index + 1
    //u will hold the random unit
    set u = data[GetRandomInt(0,index)]
    Linked List -> One sense of direction (don't know if it means the same as in french xD)
    Circular -> Two sense of direction. The first to loop through, the second to recycle !

    Thanks for the compliment !

    EDIT : But to be honest dunno how to do singly linked list to do recycle and loop ^^'
    EDIT2 : Maybe two singly linked list works like this . But this will looks like circular at one moment ^^
    EDIT3 : Ah yes ... I remember now, they are using the head/prev/next thingy.

    EDIT4 : Starting to going mad xD !
    Ahah when I got a bug on that spell I posted it in the WEHZ group to find help but nobody found the bug xD !
    I found it one hour ago and now uploaded :D
    Linked list is my style ;)

    My best style is circular linked list :)
    I'm the one who revived it I told you ^^
    I'm using the model Sun Spear by Wrathion and it is called ArrowStorm at the moment but I don't really think the name is very cool ^^
    Infact when using linked list it isn't faster than dynamic indexing when non extending array ...
    And it is matter of nanoseconds so just pick your favorite... I'm starting to get bored of linked list, besides it is me who revived the circular linked list xD !

    And you're right about the typo !!
    Thanks for pointing this out !
    I'll submit this if you think it is good. -> I'll rep you for reviewed it :)
    Btw the theory is the same ^^
    Criticism of your spell in T&S :

    private constant integer AB_ID='A00T'
    private real duration=40.//Why not constant ?
    private constant real period=0.50

    I suggest you to use the cast function for everything instead of calling another func.
    I suggest you to use one global timer.
    And I don't really suggest linked list in this case but dynamic indexing.
    May I suggest you a little tutorial of mine :

    This was your christmas present (sorry I don't have better xD)
    Oh, don't worry man, it's not also my native tongue, we could always post in vm's to ask for clarifications if the need arises :D.
    Ah! No, don't worry about that. It's okay to ask anything dude, it's easier to understand (new) things if you ask questions, it's not bothering me (or perhaps, anyone here). I used to do that too when I was new to vjass.
    Why do you sound mad? I just said I dunno how to use alloc...
    EDIT: Oh! you must be referring about the jasshelper manual post I made! Please don't be mad, I was replying to the post above mine and not your post dude. Sorry about that, I hope I didn't hurt your feelings man.
    No problem I'll send later (like when I'll be in holidays because atm see my mood and I have things IRL to do).
    If you want I can send you some things I made ;)

    You can see my fear explosion spell.
    This one use extends array for a good reason and the coding is very well done compared to Fear System. It is less long and easier to understand I think.
    Battle Cruiser, Operational! ... Signal Lost!
    Hey yo, sorry for the late reply, about Alloc! I dunno how to use modules haha xD Sorry about that...
    Actually to be honest, I'm very proud of this system :)
    But there is some things I would like to change when I'll have the time.
    FearSystem use extends array for nothing but I didn't want someone to bore me with this.
    That's why I did this.
    Alloc isn't really a good idea ....
    Because if you want to use struct extends array it is because you need another allocator (like when using something special like in my Fear Explosion) not to use the same without protection ^^
    Whenever you need to create you use the allocate method and when you need to destroy you use the deallocate method.

    But don't use it xD
    Sorry I stalked you a bit :
    If you really want to use Alloc (even if I don't recomment it :/) :
    struct Test extends array
    implement Alloc

    static method create takes nothing returns thistype
    local thistype this = thistype.allocate()
    returns this

    method destroy takes nothing returns nothing
    call this.deallocate()
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…