skyblader
Reaction score
159

Profile posts Latest activity Postings About

  • It has always killed me when it came to the question "How to make the Dummy Unit Cast [ My Custom Made Spell ] " and i always hesitated to ask, and i was thinking,perhaps you can help me around that? :)
    im at work, can u post the triggers? along with a list of the variables and variable types?
    Trigger:
    • Create Castbars
      • Events
      • Conditions
      • Actions
        • Set Allocated_Index = RecycleList[0]
        • If then else
          • If
            • Allocated_Index = 0
          • Then
            • Set ListSize = ListSize + 1
            • Set Allocated_Index = ListSize
          • Else
            • Set RecycleList[0] = RecycleList[Allocated_Index]
            • Set RecycleList[Allocated_Index] = 0
        • Set Previous[Allocated_Index] = Previous[0]
        • Set Next[Allocated_Index] = 0
        • Set Next[Previous[0]] = Allocated_Index
        • Set Previous[0] = Allocated_Index
        • Set ListCount = ListCount + 1
        • Set Your variables based on theirs using [Allocated_Index] as the index of your variables
        • -------- U can have them run this trigger with certain variables set to correctly link in the information --------
    lol can you reply on my profile? i dont get notifications for yours, and ill post that in a sec :p
    Trigger:
    • Example
      • Events
        • Periodic Event - Every 0.05 seconds
      • Condition
      • Actions
      • Set Temp_Integer[1] = Previous[0]
      • For Each Integer A from 1 to ListCount do actions
        • Loop - Actions
          • If Then Else
            • If
              • Temp_Integer[1] Does not equal 0
            • Then
              • Floating Text - Create Floating Text that reads CastBarString at blah blah blah <------------------------------------
              • Set TimeLeft[Temp_Integer[1]] = TimeLeft[Temp_Integer[1]] - 0.05
            • Else
          • Set Temp_Integer[2] = Temp_Integer[1]
          • Set Temp_Integer[1] = Previous[Temp_Integer[1]]
          • If Then Else
            • If
              • TimeLeft[Temp_Integer[2]] is less than or equal to 0.0
            • Then
              • Set Previous[Next[Temp_Integer[2]]] = Previous[Temp_Integer[2]]
              • Set Next[Previous[Temp_Integer[2]]] = Next[Temp_Integer[2]]
              • Set RecycleList[LastRecycled] = Temp_Integer[2]
              • Set LastRecycled = Temp_Integer[2]
              • Set ListCount = ListCount - 1
            • Else
    So..
    CastBar
    Real Variable Array
    Castbar[5] = 5?

    Maybe you could use the linked listings and make a simple system as an example? Like simply creating special effects every second for 5 seconds and removing when a spell is casted? ><
    well you just go through the list and do actions to whatever is in that index
    ie: Create a castbar based on a real variable that stores the time left, then set that variable equal to itself - the periodic duration
    you arent making it difficult, i wouldnt be on the helper if i didnt enjoy helping :p
    ok
    so ill do this as a series of events and results:

    Map Initialization
    -ListSize = 0
    -RecycleList[0] = 0

    CastBar Start
    -ListSize = 1
    -RecycleList[0] = 0
    -Next[0] = 1

    CastBar Start Number 2
    -ListSize = 2
    -RecycleList[0] = 0
    -Next[0] = 1, [1] = 2

    CastBar Finish Number 2
    -ListSize = 2
    -RecycleList[0] = 2, [2] = 0
    -Next[0] = 1, [1] = 0

    CastBar Start Number 3
    -ListSize = 2
    -RecycleList[0] = 0
    -Next[0] = 1, [1] = 2, [2] = 0

    CastBar Start Number 4
    -ListSize = 3
    -RecycleList[0] = 0
    -Next[0] = 1, [1] = 2, [2] = 3, [3] = 0

    All Finish in numberical order
    -ListSize = 3
    -RecycleList[0] = 1, [1] = 2, [2] = 3, [3] = 0
    -Next[0] = 0

    So eventhough there have been 4 castbars total, the indexes used were at the highest 3, because only 3 at a time at the most were being used, keeping the index very very low
    LastRecycled is like another version of Previous[0]
    RecycleList is like another version of Next
    When the list is empty, it will use the next number that has not yet been used, starting with 1
    at the beginning of the game if you start a castbar it will use 1, then if you use another one while that one is still filling up it will use 2, then if 2 finishes before 1 does, it gets added to the recycle list so RecycleList[0] = 2 and RecycleList[2] = 0 and LastRecycled = 2
    then when 1 finishes right after it will be like this: [0] = 2, [2] = 1 and [1] = 0 now and LastRecycled = 1 now
    then u pull from that list until [0] = 0, then u add 3, and rinse and repeat
    that way the most indexes you use at one time will be the most ammount of castbars you have at a single time...

    say you have 5 castbars at one time, then the index gets to 5 max, but until you have 6 at one time it will just keep re-using the 1-5 indexes
    its a one way linked list that recycles indexes, so you re-use indexes that you used already, RecycleList is a variable array for integers where:
    RecycleList[0] = 5, RecycleList[5] = 20, just like a linked list all the way back to 0, when you finish with an index, you set RecycleList[LastRecycled] = Index and Last recycled = Index, so u just added one to the recycle list, then to get a new index, if RecycleList[0] = 0 then you dont have any indexes to re-use and need to create a new one, then you up the variable ListSize and use that as the new index rather than taking RecycleList[0]
    does that make sense?
    you add the link like this:
    instead of doing what you normal do (adding the unit to a unit group i think)
    you use the allocate trigger i posted on your thread, which gives you a new index
    then you can do this:
    set next[new_index] = 0
    previous[new_index] = previous[0]
    next[previous[0]] = new_index
    previous[0] = new_index
    because when looping it is much more efficient to count backwards down to 0, when you go up from 0 to some # it is less efficient, generally this will be in an increasing order in the list so i go from previous[0] down
    for now ignore the allocation and deallocation triggers i posted in your thread, ill explain those when you have linked lists down
    you could use it in the loading bar like this:

    Trigger:
    • Periodic Floating Text
      • Events
        • Periodic Event - Every 0.05 seconds
      • Conditions
      • Actions
        • Set Temp_Integer = Previous[0]
        • Loop for each integer A from 1 to ListCount do actions
          • Loop - Actions
            • Floating Text - Create the floating Text that reads Combined Strings(Subtext(1, Integer(TimeLeft[TempInteger] / TimeMax[TempInteger]), ||||||||||||||||||||||||||||||||||||||||) + Substring((Integer(TimeLeft[TempInteger] / TimeMax[TempInteger]) + 1, 40, ||||||||||||||||||||||||||||||||||||||||) This creates the bar by using substrings rather than combined strings
            • Set TimeLeft[Temp_Integer] = TimeLeft[Temp_Integer] - 0.05
            • Set Temp_Integer = Previous[Temp_Integer] &lt;--------------------Now Temp_Integer is a different number, so you are doing all of those actions again to a different index


    Where TimeLeft is the time left on the cast, and TimeMax is the maximum time of the cast, see where that would work?
    no it will actually cause less lag, u just wont be able to have 3 hr long games because after a while the game will start to lag like a mofo, it slowly uses up more and more ram, but wont cause lag until they have like none left
    Next[0] = 1, Next[1] = 2, Next[2] = 3, and Next[3] = 0 then:
    0 -> 1 -> 2 -> 3 -> 0
    basically it goes in a circle that gets bigger and bigger the more things you add to it, but you can go through all of them almost instantly with the triggers i posted on your system, the only problem with it is that it is not efficient triggers wise and leads to a high trigger count making your map less efficient, in jass you dont have that problem and your trigger count does not go up 1 time in that entire system
  • Loading…
  • Loading…
  • Loading…
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    I ordered like five blocks for 15 dollars. They're just little aluminum blocks with holes drilled into them
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits
  • Varine Varine:
    I see that, despite your insistence to the contrary, we are becoming a recipe website
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air

      The Helper Discord

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top