Search results

  1. X

    Yet, another leak question

    function 2 takes nothing returns nothing local timer t=GetExpiredTimer() (do something) call PauseTimer(t) call DestroyTimer(t) set t=null endfunction function 1 takes nothing returns nothing local effect sfx local timer t if (condition==true) then set...
  2. X

    Remove Magic Immunity from Magic Defense

    I can't believe how much time I've wasted over this already...:( As the title suggests, I wish to remove the magic immunity from the Magic Defense ability when it's activated and use it as a dummy ability. My first thought was that the ability works much like defend but as it seems, I was...
  3. X

    Very Simple Group Filter

    The Simple spell causes units around the target unit to take damage based on some variables, simple as that. -I don't want to keep the group, thus using a empty global group (gr) declared at initialization. function Simple_Filter takes nothing returns boolean local unit uf=GetFilterUnit()...
  4. X

    constant unittype UNIT_TYPE_CUSTOM

    I've made several tests and searched around but I've found nothing... Is there a way to add new classifications to be used with IsUnitType native? That could really make things 1000% easier. Thnx.-
  5. X

    Faster/Efficient Code

    Under the impression that the game continuously checks every trigger in the map, it's been a while that I'm converting triggers into functions. I have a trigger that runs every second through out the game and I've been adding more and more functions to it. Is there anyone who is familiar with...
  6. X

    Null filter

    call TriggerRegisterUnitInRange(gg_trg_trigger1,udg_unit,250,null) As far as I know, using a null filter leaks, so I've tried to get rid of it by using a function that returns true. function noleak takes nothing returns boolean return true endfunction Can I use this: call...
  7. X

    Or/and functions

    if udg_Boolean[1]==true and (udg_Int[2]==26 or udg_Int[2]==27 or udg_udg_Int[2]==28 or udg_udg_Int[2]==29 or udg_udg_Int[2]==31) then do something endif Issue 1: Can boolean be used with integers in the same -IF- line? (I've tested it and it seems to work as far as I understand, yet...
  8. X

    Filtering Groups

    Ok, I thought I was doing well in learning Jass, until I've reached to the point that i wanted to convert something like this: Set Temp_Group = (Units within 512.00 of Temp_Point matching (Several conditions)) Following the lead of a tutorial, I've created this: set i=0 loop set...
  9. X

    Newgen Pack & Latest patch

    I've downloaded Newgen Pack v5d because the WE Jass interface is rather awful and also wanted to have a go with the object merger. 1. When I tried to load a map I'm working on, it gave me a warning that the map is saved in a newest version and some features might not work or get disabled...
  10. X

    Local variable nullification & the native CreateUnit

    It's a couple of days now, that I've began learning Jass. I don't mind that is time consuming as long as things are done in the best, most effective and correct way, else what is the point using it? I'm a total noob, so please bear with me. While trying to learn by improving/correcting my...
  11. X

    In need of a few clarifications

    Maybe someone experienced enough can clarify a few things? 1. Lets assume that we want to spawn units from a specific point, facing a specific point throughout a long period of the game. Can we set a unique variable to those points and keep using them over and over again without any leak? Can...
  12. X

    Neutral Building Add/remove unit BUG

    Obviously I have to re-write the post since it was rather confusing and I think I narrowed down the issue. Lets assume a market with the sell units ability and 12 units each set with unique art-button positions. Here is what happens when I try to add all 12 units with a trigger: The 11 first...
  13. X

    Leak removal custom script

    At the moment, I'm using this custom script to remove points that belong to a point variable array: Custom script: call RemoveLocation(udg_Death_Location[bj_forLoopAIndex]) I wish to use a variable array for the loops as well, called Loops(6). Does someone knows how to modify this custom...
  14. X

    Add unit to market with trigger VS Hotkey

    Facts: 1. If have a unit preplaced into a market, you may not remove it via triggers. 2. If you add a unit to any market via a trigger (so you can also remove it with a trigger), you may not have a hotkey for it. Anyhow, I know that can be done. In DOTA, while choosing a hero you may use a...
  15. X

    Healing potions that grant % regeneration

    I've been trying to create potions that grant % life regeneration over 5 seconds without the use of triggers. So far, I've used clarity potion and roar but they both seem to grant specific number of Hit points regeneration over time. The healing ward ability simply gives the healing potions a...
  16. X

    Setting a preplaced region into a variable vs Leak

    Somehow I got confused over this, I hope there is someone who can clear this up. I have several preplaced regions that I need into an array variable. So, for this region named Town <gen> I used set Region(1) = Town <gen> at initialization. (I'm not sure if that leaks, as far as I know leaks...
  17. X

    Computer Hero + custom Abilities vs AI Editor

    Hello everyone! I've been making a map with many heroes and custom abilities and now reached a critical time when it comes to the computer behavior. I've been adding custom abilities to custom heroes via triggers and noticed that the computer uses some, ignore others. For example, it loves to...
  18. X

    Event Response Unit lost by Trigger

    I've done some testing but I cannot conclude to a result 100%. Maybe someone can help... Event Unit - A unit Sells a unit Conditions (Unit-type of (Sold unit)) Equal to UnitX Actions Do something for (Owner of (Sold unit)) .... Wait 5 seconds Do something else for (Owner of (Sold...
  19. X

    Defeat Player x doesn't trigger Player - Player x leaves the game with a defeat

    I wonder if anyone knows a way out of this: Trigger 1 Player - Player 2 (Blue) leaves the game Trigger 2 Player - Player 2 (Blue) leaves the game with a defeat Trigger 3 Game - Defeat (Player 2 (Blue)) with the message: Defeat In this case, player 2 will be defeated but trigger 1...
  20. X

    Saving hero & skills into a variable

    Lets assume a hero level 20 that is pre-placed on the map. His level and his abilities are set by double clicking on the image etc. Is it possible to copy this hero WITH his abilities via storing it into a variable or by using any kind of trigger? When I tried that, it created a hero of the...
Top