Search results

  1. K

    [JASS] Trackables

    Well, I started a map once (that I never finished) where all units had the Locust ability, and you would move your hero around by clicking invisible trackables on the ground. This allowed me to use all 12 command button slots by making a control unit in the corner of the map that was constantly...
  2. K

    [JASS] Trackables

    ...and a lot people used to say that calling InitGameCache over and over wouldn't leak - a lot of people were wrong. Both mistakes were caused by people jumping to conclusions a long time ago. Also remember that trackables were discussed before the gamecache and return bug were put to use, so...
  3. K

    Modding Community Project

    I like the idea, though it sounds rather difficult to achieve. For the list of resources, I propose that you add http://www.wc3jass.com. It is focused on Jass Scripts alone. At the moment there are 289 Jass scripts (some less useful than others I'm afraid) submitted ready to be used. When...
  4. K

    [JASS] Transparent Roofs for 1 player

    No, you must put the code inside the actions function. function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing // A unit enters the building local unit roof = gg_unit_hfoo_0000 call FadeUnitVertexColorForPlayer( roof, 1, 1, 1, 1, 1, 1, 1, 0.40, 1.0...
  5. K

    [JASS] Transparent Roofs for 1 player

    A quick re-writing of my function to work with local players. I have not tested it, but I think it works. // ======================================= // Fade unit vertex colors function FadeUnitVertexColorForPlayer_Update takes nothing returns nothing local timer t =...
  6. K

    [Solved] Mouse Button Click Event?

    There is no way to specifically detect the left mouse button click. However, you can cover the entire map by trackables (or one biiig trackable), and detect its hit event. In that case, it will trigger for left and right mouse button alike, and there will be a few side effects like units'...
  7. K

    [JASS] My special effects wont DIE!

    The function GetLastCreatedEffectBJ only works if you created the effect usinga BJ function. That is, AddSpecialEffectBJ or AddSpecialEffectTargetBJ. But I don't recommend using those function. I'd rather save the effect directly in a local: // This is where you create the effect set...
  8. K

    [JASS] Removing a unit variable, without removing the unit?

    If you mean a variable set using the handle variables, you just set that variable to null (or 0) and it is cleaned up. If you mean a global or local variable, it makes no sense trying to remove them.
  9. K

    [JASS] Variable not being passed correctly?

    Glad to hear that it works. It's not as complicated as you think it is. Remember: A timer is not destroyed when it expires. It still exists as an object, even if you set periodic to false (non-repeating). There is still a lot of work for you if you want it perfect, because there are many...
  10. K

    [JASS] Variable not being passed correctly?

    The problem is that you are using the Trigger to store the variables on, where you should use the timer. In the SkyPortion function, you should set the variable on the timer rather than the trigger. And in SkyDamagePortion you should use GetExpiredTimer() instead of GetTriggeringTrigger()...
  11. K

    [JASS] Help! My spell compiles fine, but does nothing!

    What I meant was that you don't need to include the spell level in the handle var label: So you do like this: // Here you set it: call SetHandleReal(GetTriggeringTrigger(), "Damage", Damage[alvl]) call SetHandleReal(GetTriggeringTrigger(), "Healing", Healing[alvl]) call...
  12. K

    [JASS] Help! My spell compiles fine, but does nothing!

    The problem is in the HE_Var_Setup function. // This is where you set the variables set alvl = GetHandleInt(GetTriggeringTrigger(), "alvl") call SetHandleReal(GetTriggeringTrigger(), R2S(Damage[alvl]), Damage[alvl]) call SetHandleReal(GetTriggeringTrigger(), R2S(Healing[alvl])...
  13. K

    [JASS] Dumb question, but quick.

    I suppose you mean these: ¯¯¯¯¯ You make one by holding ALT down while pressing: 0 1 7 5 on your keypad, then release ALT again.
  14. K

    [JASS] JASS question(s)

    Hmm.. somehow Modeler's post got messed up it seems. Anyway, the selected unit can be gotten using: Event Response - Triggering Unit The player who selected the unit can be gotten using: Event Response - Triggering Player If you try to use a global in an event, it will not work because...
  15. K

    [JASS] Errors & punching yourself - Help me >.>.

    Because the error messages are almost useless, one cannot make a list of their meaning. One small typo can result in 200 errors reports. You can use the PJass syntax checker to check your code for errors - that one gives reasonable error reports. I think you can find PJass in the tools section...
  16. K

    [JASS] Evil Compiler - Cant fix my problem!

    I wrote a tutorial on how to beat that issue. Using globals tend to get messy because if your trigger runs more than once at the same time, everything will be messed up. You can read the tutorial, but it is very generic so you may have a hard time understanding how it works. The Handle...
  17. K

    [JASS] Evil Compiler - Cant fix my problem!

    This line is wrong: set t1 = CreateTimer(t, 0.03, true, function k_001(target, 6.00, cast) You cannot pass parameters to a code parameter, AND you are mixing CreateTimer and TimerStart together.
  18. K

    [JASS] Fullscreen GUI

    There is no "secret" to making a trackable grid. There is a tutorial here, that explains you how to use trackables. If you download the example map there, you can see how to make a trackable grid.
  19. K

    [JASS] Question about jass/gui

    I believe Blizzard are reference counting the handles, so that a handle's id is free for recycling once it is no longer referenced by any variables. But Blizzard did not decrease the reference counter when local handles are eliminiated at the end of a function. If all of that went your over...
  20. K

    [JASS] Mouse Selection Question

    I think you can remove the selection circle by setting Selection Size (or something like that) to 0.00 in the Object Editor for all units. If course, if you want to turn it on and off again, that wouldn't be an ideal solution. There is an object called a trackable, which was never used by...
  21. K

    [JASS] Proper way to display fading overhead damage

    In order to make a texttag fade out, you must set it to be non-permanent (aka. temporary). You do that using SetTextTagPermanent(texttag, boolean). Use SetTextTagLifespan to set the total duration from birth until the texttag is completely gone. SetTextTagFadepoint sets the number of seconds...
  22. K

    [JASS] How to add ability to hero in learnable list

    The closest you come to achieving this effect is to give the hero the ability in the object editor, and then disable the ability for the player owning that hero. When you want the ability to become available for learning, you can enable it for the player owning the hero again. The obvious...
  23. K

    [JASS] Damage to Gold?

    Using the Handle Vars: function DamageToGold takes nothing returns nothing local trigger trg = GetTriggeringTrigger() if ( GetHandleUnit(trg, "attacker") != GetEventDamageSource() ) then return endif /// Give gold to player here... call FlushHandleLocals(trg)...
  24. K

    [JASS] Damage to Gold?

    Your final script looks fine. Creating a trigger on the fly and letting it destroy itself is a good solution, often used by experienced Jass coders. You can become a great Jass scripter :D I think GetEventDamage() is called "Event Response - Damage dealt" or something like that in GUI under...
  25. K

    [JASS] Game Cache

    Game Caches work fine in multiplayer. The only difference is that you can't save it to the harddisk in multiplayer.
  26. K

    [JASS] JASS Pro Wanted

    Well thank you Nantuko! To your information it was updated over a month ago, so maybe you were just too lazy to download it again. Click here to download my editor. The syntax checker doesn't work, but it has a fine list of all the functions available. Including those from 1.18.
  27. K

    [JASS] Damage to Gold?

    function InitCalc takes real Life, unit Attacked, unit Attacker returns nothing local trigger Calcstart set Calcstart = CreateTrigger() call TriggerAddCondition(Calcstart, Condition(function DamageSource)) call TriggerRegisterUnitEvent(Calcstart, Attacked, EVENT_UNIT_DAMAGED) call...
  28. K

    [JASS] The Script of Stun Aura why it doesnt works?

    I rewrote a lot of your code for you. I hope are ok with using the handle vars instead of whatever "GetLinkedUnit" was supposed to mean. You can get the Handle Var Functions here. I couldn't test the code in WE since I don't have my Warcraft CD right now. I added comments where I made...
  29. K

    Attack while moving (Ability)

    This is in reply to your first post. Daelin is absolutely right that no unit can move and attack at the same time. But what's stopping us from simulating an attack? :) I put something together that might help. Note that I havn't got WE with me here so I can't test if it works. Try calling...
  30. K

    [JASS] Help : Pass local to function

    FlushHandleLocals is a function that will remove all locals set using SetHandleHandle, SetHandleInt, SetHandleString or SetHandleBoolean. Just call it before destroying something that might have locals on it. You should call it before destroying anything that has locals set on it. You...
  31. K

    [JASS] Looking for the 'handle2trigger' function.

    You need to copy all of this into the map header, before dataangel's code. // =========================== function H2I takes handle h returns integer return h return 0 endfunction function Handle2Trigger takes handle h return trigger return h return 0 endfunction...
  32. K

    Jass Editor 1.1a

    I made an updated version of the Jass Editor, but I can't update it here on wc3sear.ch for some reason. I have asked oz02 if he would kindly do it for me since he is a moderator. In the mean time, it can be downloaded here (330 KB). The exe file is the same, the only thing changed it that it...
  33. K

    [JASS] Fade Filter Script Question

    This might desync, but there is a fair chance that is works (I just came up with it). function CinematicFadeForPlayer takes player p, real red, real green, real blue, real duration, string tex, real startTrans, real endTrans returns nothing if (GetLocalPlayer() != p) then return...
  34. K

    [JASS] why is this simple function leaking?

    The problem is here: local group all=CreateGroup() set bj_wantDestroyGroup=true set all=GetUnitsInRangeOfLocAll( range, origin) It should look like this: local group all=GetUnitsInRangeOfLocAll( range, origin)
  35. K

    [JASS] why is this simple function leaking?

    You are right. I did some tests on this and I found out that the problem is InitGameCache. When people started using the gamecache someone convinced me that it didn't leak - but it does! It returns a new handle every time and those handles leak. To fix it, make a global Gamecache variable and...
  36. K

    [JASS] why is this simple function leaking?

    Don't forget that if you remove the expired, you should call this first: call FlushHandleLocals(t) The references are left behind in memory unless you flush them.
  37. K

    [JASS] Script Errors

    It looks like you need to define a function called Voting. Keep in mind that function names are case sensitive.
  38. K

    [JASS] multiboard help!!!!

    Try to explain what you have tried and we can tell you what you did wrong. Start out by making one in gui (it's easier) and then move on to jass after that.
  39. K

    [JASS] Function Idea

    It can't really be done since functions can't take arrays as parameters. However, there are a couple of "object" array systems out there that uses an integer as identifier and the gamecache to store the data in the array. When I need a dynamic array I use the list utility (found here)...
  40. K

    [JASS] Memory Leaks

    Try this: ACTIONS: -Set Point_Generic = Position of casting unit -Clear Group_Generic -Set Group_Generic = (Every unit within 300.00 of Point_Generic) -Pick every unit in Group Generic and do actions: <ACTIONS> -Custom script: call RemoveLocation( udg_Point_Generic )
  41. K

    [JASS] JUst wondering

    First you need to find the algorithm for the circular motion. If you are adept in trigonomity math it shouldn't take more than some minutes with a piece of paper. Although it will be easier with Jass, this is indeed possible with Gui.
  42. K

    [JASS] Please Help: Multiboard -> Inventory JASS

    I'm not sure what you want to achieve. If Player 2 (Blue) writes "-inventory red", do you want it to display Player 1's inventory to Player 2? Or should Player 2 write "-inventory" to see his own inventory? Btw, you can't access an Item's Icon from the trigger editor. You will have to write...
  43. K

    [JASS] how to pass between functions without Globals?

    When a unit dies (or decays) run FlushHandleLocals with the dying unit. Like this: call FlushHandleLocals(GetDyingUnit()) That cleans up the references (but not the objects). Likewise, before destroying a handle, also call FlushHandleLocals with that so you don't leave any unnecissary...
  44. K

    [JASS] how to pass between functions without Globals?

    You should use local handle vars. Like this: local unit u = ... // parameter call TriggerAddAction(trg, function SomeFunc) call SetHandleHandle(trg, "LABEL", u) function SomeFunc takes nothing returns nothing local trigger trg = GetTriggeringTrigger() local unit u =...
  45. K

    [JASS] Finally I found out what "Jass" stands for

    I dont find Wc3 Jass related to Java in any way at all. The two languages are very different, so I don't think that it means Java with Assertions.
  46. K

    [JASS] Help whit JASS spells

    When you copy and paste the spell(s), make sure that you copy everything from the map header as well as the triggers that make it run - do not rename the triggers. Finally if the base spell has an ID different from the one used by the triggers, it should be replaced as well. You can see the ID...
  47. K

    [JASS] question about arrays

    Are you sure about that? That's interesting, I wonder why they have a maximum size then.
  48. K

    [JASS] question about arrays

    *grunts* Vex didn't invent the handle variables. All arrays are 8192 (or something like that) wide and it shouldn't matter wether you use arr[8000] or arr[0], it uses the same amount of memory. Unitialized variables can be used for comparison, but passing them to native functions will in...
  49. K

    [JASS] How do you install custom jass scripts

    Okay, copy both scripts into the map header. To use UnitGuardUnitAI, make two unit variables. I call them Guard and GuardMe. Store the unit to be guarded in GuardMe and the one to guard it in Guard. Then do like this: set Guard = (..) set GuardMe = (..) Custom Script: call...
  50. K

    [JASS] How do you install custom jass scripts

    Depends on the Jass script you want to "install". Most of them needs to be copy/pasted into the map header*. After that you need to use the Custom Script action to call its main function, but then again it depends on the script, and there is no standard way of doing it. Note that some of the...
Top