• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

loop

  1. Prostagma

    [Solved] Creating a loop spell

    Hello, I've been searching on how to create a loop spell in a specific way but I just can't find any tutorials on how to do it (or maybe I'm too dumb to understand). I'd like to create a volley spell (archer) that fires arrows from the heroes while he's channeling (because making arrow falls...
  2. J2Krauser

    [Solved] Channel animation looping indefinitely

    Hi. Keeping it short: Channel-based (ANcl) ability, Follow Through Time is set properly. But since there's a requirement for using it, it gets canceled at EVENT_PLAYER_UNIT_SPELL_CAST if the requirement is not met. This is done by ordering the unit to "stop" and that's all. This causes the...
  3. Spacebuns

    Effortless and Efficient Unit Group functions for GUI Triggers

    Effortless and Efficient Unit Group functions for GUI Triggers Background This is a tutorial for GUI users to learn how to use the new natives for Unit Group functions while mapmaking. A lot of people, I assume, are still using GUI triggers because they don't have more time to devote to...
  4. Rasamayu

    [Trigger] Wait in a periodic trigger cause a bug or damage in the trigger?

    Greetings hive I am creating a skill that stops time, this skill can only be cast by one unit at a time, which means that simultaneous casts are not allowed. And what I want to do to make it more realistic is to place a Wait, verifying if the ability to stop time is active with a bool, in...
  5. HerlySQR

    [Solved] Can't find the infinite loop in my spell

    I made this spell to emulate the stampede but instead of lizzards, there are fire ball, I wanna test it but there is an infinite loop that I can't find, could you do it for me pls? I'm using a custom Alloc and Table and a unit indexer scope FireStorm initializer Init struct FireStorm...
  6. Cheshire

    [Solved] loop not looping... ?

    hi, I have this trigger that is part of an ability that is supposed to send random units in the unit group to random places on the map. it works, but it's not working multiple times like it's supposed to, only once. I can't figure out why. I'm talking about the loop starting - "for each...
  7. Mangouste

    [Solved] Fixing memory leaks prevents trigger from working...

    Hello everyone! I made a spell via trigger that works perfectly fine (but leaks), and when I add the custom script to remove location memory leaks it stops working, like it can't find location anymore. Crushing Wave Events Unit - A unit Starts the effect of an ability...
  8. Peach Schnapps

    What are the differences in MUI setups?

    From what I’ve read there’s multiple ways to go about setting up an MUI spell or “system”, using an array, using hash tables, I’m just curious are any of these considered the optimal method? Are there draw backs to any?
  9. bruunk

    [Solved] Difficulty understanding loop + random integers

    Hi, I want to make a simple drop system where every time a unit dies there is a small chance to get 1 of many items at random. The items will be non-recurring (only drop once per game). I don't want them to drop in a linear format, and I think that's what I'm having the most trouble...
  10. Cheshire

    [General] picked unit loop inside picked unit loop

    hello there, If I nest a "pick every unit in unit group" loop inside a "pick every unit in unit group" loop - which unit will be treated as picked unit? will something like this work, or will it refer back to the first picked unit again? Carried periodic Events Time - Every...
  11. Peach Schnapps

    [Solved] Pretty please help making GUI dummy/buff system MUI?

    Trigger Events Player - Player 1 (Red) types a chat message containing test as An exact match Conditions Actions Set VariableSet Hero_Group = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Hero)) Unit Group - Pick every unit...
  12. Bloodheaven_

    [Solved] How to assign each Player 1-8 a different value from 1-8?

    Hey there, I'm currently trying to work with the loop function and trying to assign every player a different value from each other. Actions Set VariableSet Temp_Integer = 0 Custom script: loop Set VariableSet Temp_Integer = (Temp_Integer + 1) Set VariableSet...
  13. Bloodheaven_

    [Crash] Camera Trigger causes 100% desync

    Hey there, currently working on a Camera-System that rotates the camera depending on where the current camera view is. The only suspicious Action that could cause an Desync is "Source of current camera view", (because it gets the data locally, im not sure?) So if that function causes the...
  14. lolreported

    [vJASS] Issue with nested loops, possible bug

    I'm currently having a massive issue with a nested loop, see code (some irrelevant code removed): library JustAnotherLibrary initializer Init globals //... private constant integer PLAYER_MAX_CELLS_ROW = 3 // Max cells up/down private constant integer...
  15. Uncle

    [Solved] Turn off trigger, do something, turn on trigger. Is this a safe method to avoid infinite loops?

    So, my trigger is working fine. I'm just curious if turning off a trigger, then doing something that would run the trigger's Events, then turning the trigger back on is a safe method to avoid a crash/infinite loop. Destructible Death Events Conditions Actions If...
  16. Uncle

    [Solved] Issues with Run trigger/For Each Integer. Actions are executing out of order.

    Alright, so I didn't know how to word this one, but basically the issue is with this trigger: Generate Walls Events Time - GenerateTimer expires Conditions Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions...
  17. Uncle

    [Solved] Issues with loops (Indexing something inside of the same loop)

    Found the issue to be something else entirely and this was a big waste of time hehe.
  18. Bombriick

    [JASS] code after endloop not functioning

    The following code is not working for some reason after endloop, what's is wrong here? set udg_counterab = 0 call BJDebugMsg("test") call DestroyGroup(ug) function aa takes nothing returns boolean if (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == TRUE) then...
  19. SoooK

    [Solved] Killing a unit inside a UnitGroup loop messes up my trigger.

    I want to pick every unt in a group matching some conitions and then deal damage to them. This works fine as long as I don't kill any unit. If I do, then the UnitGroup loop still cycles through all units inside the UnitGroup, but: 1. every other unit after the dead one, doesn't recieve damage...
  20. SoooK

    [Solved] Help me understand loops and actions per unit in group

    I don't understand: For each (Integer INT) from a to b, do (Actions) Unit Group - Pick every unit in GROUP and do (Actions) I think, that every action inside a "For each INT from a to b do (Actions)"-loop, is executed for the current value of INT, then INT gets increased by 1 and repeats all...
  21. Jesus from Ukraine

    [General] Limit of units trained per building

    What i want: I was trying to create an autotraining system for buildings, something simmilar to Castle Fight, but with one important condition: Every building can have only limited ammount of alive units at a time. I.e. Barracks#1 trains units until the established limit of units (let's say it...
  22. Woodenplank

    Forcing unit animation

    Hi Hive I'm making a sort of "motion blur" movement speed ability, and it almost works perfectly. The trigger gives some movement speed abilities and such to the caster, but it also does a loop every 0.20 seconds which creates a transparent clone of the Hero. The clone starts with 60%...
  23. Inspexor

    [General] Unit patrol problem

    I'm trying to let a unit patrol, then it should wait a second at their current position (checkpoint A), then patrol back to the previous point (checkpoint B); and all that in a loop. Right now the unit either just keeps standing on one checkpoint or it patrols without waiting at the checkpoint...
  24. Mistablockout

    Camera Loop

    Hello everyone! To start, I only have two camera commands: "-cam", and "-setcam". The "-cam" command works perfectly fine, nothing wrong there; the "-setcam" command is where the issue is. I want "-setcam" to be an advanced camera command where a player can permanently keep the camera height...
  25. zhica

    [Solved] Help, Weird loop

    Full A looping Trigger Events Time - Every 0.03 seconds of game time Conditions Actions Custom script: local integer i Custom script: local boolean recycle = false Custom script: call IncreaseArray() Custom script: set i =...
  26. Rektis

    [Solved] Loop adding abilities crashes game

    Why does this crash the game after ~10 seconds (several units die inbetween)? VeterancyLevels is an ability array with indices from 0 to 6, VeterancyLevelsBuffs is a buff array with indices from 0 to 6, TempUnit is a unit variable. The trigger is supposed to check for dummy abilities giving...
  27. DeMoN100

    Spell Animation

    Hello there, I am trying to make a spell effect that loops on a unit until the buff is removed from him. The spell I am using is inner fire and the effect appears on the unit. Now I am running into a issue with this and the issue is as soon as I cast another spell from any unit on any unit the...
  28. Woodenplank

    [Trigger] (Slowly) Expanding Circles

    I've made a trigger that, when a unit instant cast ability, will spawn wave after wave of outwards expanding circles from the point, much like rings formed after dropping something in water... Except with cool fiery explosions. The trigger works without a fault, but to give it the slow...
  29. eejin

    [JASS] Looping over players

    Hi, i was wondering why the following snippet doesn't seem to work. I'd expect it to work for all players, but it doesn't seem to do anything. function Trig_Add_Strength_Actions takes nothing returns nothing call DisplayTextToPlayer(Player(0),0,0,"You just pressed ESC") endfunction...
  30. Athur12A2

    [Solved] FPS drops with loop in MUI spells

    Up until now, I have always done MUI spells with array method and periodic timer (0.03125s). A friend told me it is make w3 run multiple loops O(n) by running integer loop, creating+destroying groups, which greatly causes Fps drop. I tested it with a simple CUSTOM spell and it went down from 55...
  31. Azsure

    [Solved] Trigger Loop not meeting condition goes endlessly, causing CTD

    Hi, I needed some assitance with a code I just made up now, not only does it not do what I intended it to, but it seems that the conditions are never met and thus causing an endless loop that cause a imminent CTD. The trigger is as follows: There are 6 regions in the map, a RNG will determine...
  32. Azsure

    [Solved] Loop not working, has diminishing return results

    Hi, I'm having a strange problem with a loop trigger I made recently, the idea is as follows: 10 trees are spawned randomly across the map at initialization, those 10 trees will spawn another 100 trees each, one after the one, forming a chain to simulate a randomly generated forest. To do this...
  33. Woodenplank

    [Solved] Spawning Effects in a circular lines

    Not sure if the title is misleading, but I'll make a drawing to demonstrate the issue. I'm trying to get Holy Light special effects (actually just a unit with the holy light model) to spawn in seven lines of 3 effects in a circle (see drawing in Spoiler) A Hero casts a point-targeted spell...
  34. AGD

    LoopEvent

    I based this work from the idea I found here which uses one universal timer for all 0.03125 period codes. Basically, what mine does is somewhat similar to the previous one but the difference is that it allows you to specify other periods aside from 0.03125 while still using a single timer for...
  35. WraithSeeker

    Looping background music

    How to make the background music loop?
Top