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. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  5. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  6. The 13th Music Contest Poll is up! Vote for the best tracks in this symphony of frost and flame.
    Dismiss Notice
  7. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    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.
neku99
Last Activity:
Jul 20, 2019
Joined:
Sep 3, 2009
Messages:
443
Gender:
Male
Birthday:
Mar 18, 1995 (Age: 24)
Location:
...
Occupation:
...

neku99

re, Male, 24, from ...

neku99 was last seen:
Jul 20, 2019
    1. Adiktuz
      Adiktuz
      I call it hobby, but I dont like saying hobbying so when I use ing, I use the word work... nope... you can return only 1
    2. Adiktuz
      Adiktuz
      work, I mean modding... ^_^
    3. Adiktuz
      Adiktuz
      working working working... the internet connection is bad right now...
    4. Adiktuz
      Adiktuz
      ^_^

      btw, the release of the demo might be tom evening... ^_^
    5. Adiktuz
      Adiktuz
      you wrote on your own page again... ^_^
    6. neku99
      neku99
      Oh lol I thought it was needed to get an instance to upadate the TOTAL for the loop but meh you cleared it out. Ehm still doing the move system though. When I finish I'll let you see it.
    7. Adiktuz
      Adiktuz
      that is used for getting the instance of a unit casting the spell... anyway, you can use it for other purposes, I added it so that users can do more...

      as you see, EndChannle uses the GetChanneledInstance right? now what if a unit wants to get an instance, no matter if its a channeled or not, that is where GetInstance comes into... for example, if you want to dynamically change the value of a member in another code you can do this


      set NovaSystem.GetInstance(unit).npih = 3
    8. Adiktuz
    9. Adiktuz
      Adiktuz
      I call .destroy inside the loop... nulling isnt required since struct members are globals...

      I dont need to destroy extra things like groups or points either (well, I dont use points and I only use 1 global group which if destroyed will corrupt the code...)
    10. Adiktuz
      Adiktuz
      yeah, and that's why my reply for that post was late... ^_^
    11. Adiktuz
    12. Adiktuz
      Adiktuz
      you will only pause the timer if there is no instance of the spell running...

      and there are no loops, its only a single loop....

      you can look at how I used timers on my systems... ^_^
    13. neku99
      neku99
      Wait a global timer, won't it bug when I , for example pause the timer. Won't it pause all the loops? (btw I dunno how to use timers)
    14. Adiktuz
      Adiktuz
      yup, you need one global timer for that... ^_^
    15. Adiktuz
      Adiktuz
      you can learn how to do that by looking at the nova system...

      basically for a movement spell you create a real struct member which will determine the distance travelled every loop, now set it to the max distance upon create and reduce it by the distance travelled per loop, now if it become <= 0.00, the spell is finished


      struct movement

      static method looper takes nothing returns nothing
      local integer i
      loop
      exitwhen i > .TOTAL
      set data = .INDEX[.TOTAL]
      set data.distance = data.distance - .dpl
      if data.distance <= 0.00 then
      endif
      endloop
      endmethod

      endstruct


      ofc this is a blank sample
    16. Adiktuz
      Adiktuz
      to index it just create an integer array and an integer variable global or static struct members

      struct sample

      static thistype data
      static integer TOTAL
      static integer array INDEX

      static method create takes nothing returns sample
      //we allocate an instance
      set data = allocate()
      //we increase the number of instances in use
      set .TOTAL = .TOTAL + 1
      //we set the struct instance into the array
      set .INDEX[.TOTAL] = data
      endmethod
      endstruct


      for unit movement, there are some of that in the spells section...

      basically you make a periodic loop which moves the unit...
    17. Adiktuz
      Adiktuz
      I recycle the instances once they are not needed anymore (e.g. when the effect finishes)

      About the in-use:

      basically like that, and

      I mean rather than looping through all the possible struct instances (8190 I think) it will only loop the currently in use instances.

      See the loop,

      exitwhen i > TOTAL
      //Total is equal to the number of instances that are currently in use
    18. Adiktuz
      Adiktuz
      yup, basically the struct instance is an integer... but you cannot directly use it effectively... because allocation of structs are a bit random from my experience.

      example: I have missile spells, then I added debug messages which gave me the instance of each missile created, it gives something like, [1,2,3,5] or [1,4,2,10] so its pretty hard to use the instances as an index directly... well you can loop from 1-8190 but it would be inefficient...

      so we use an indexing system instead to loop only the in-use struct instances.
    19. Adiktuz
      Adiktuz
      because the action of the system happens over time not instant, so I used a periodic loop, it has the same logic as that in GUI because structs are just variable arrays...
    20. Adiktuz
      Adiktuz
      yup, I save the min and max of each Unit Type...

      I do it this way:
      -I decide how much min and max damage the unit will have
      -then initialize it at the library
      -then on the OE, I calculate the correct amount of base damage, number die, sides per die to achieve the min and max that I want so that the unit's UI show the correct amount... ^_^

      Min damage -> Base + NumberOfDie
      Max damage ->Base + NumberOfDie*SidesPerDie

      The indexing is to loop thru all the instances of the struct... Remember that structs are just a collection of arrays so that indexing is the same as the normal recycling indexing methods used on GUI triggers.

      I have an update for Arzachel. you might want to check it out on the map dev... ^_^
  • Loading...
  • Loading...
  • About

    Gender:
    Male
    Birthday:
    Mar 18, 1995 (Age: 24)
    Location:
    ...
    Occupation:
    ...
    Current Project:
    ...
    Favourite Race:
    Draenei
    ...

    Signature

  • Loading...