• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!
defskull
Reaction score
158

Profile posts Latest activity Postings Experience Albums Resources About Medals

  • No, you didn't get it; there is no difference between those two options. Check the examples below, they work the same way exactly:
    Set UnitGroup = (Units in (Playable Map Area))
    Unit Group - Pick every unit in UnitGroup and do (Actions)
    Loop - Actions
    Custom script: call DestroyGroup (udg_UnitGroup)
    Custom script: set bj_wantDestroyGroup = true
    Unit Group - Pick every unit in (Units in (Playable Map Area)) and do (Actions)
    Loop - Actions

    Those triggers are the same, but, as you can see the second option doesn't require you to create a unit group variable, while the first one does. So, it's up to you to decide what you're about to use, for any case, even that AoE spell you told me about.

    I usually go for the second option, since it doesn't need a variable to create the group I want to refer to.
    I am not sure about that, never heard of that, but, if it indeed attaches fine with the Sphere ability, why don't you simply use "Unit - Add Sphere to Unit" action?
    1) DestroyGroup and set bj_wantDestroyGroup = true are not really different. I mostly use the second one, so that I don't create a variable. If you use DestroyGroup, you will need to define a variable within the parentheseis, e.g. call DestroyGroup (udg_group). If you use the second option, you do not need a variable, you can instantly do this:
    Custom script: set bj_wantDestroyGroup = true
    Unit Group - Pick every unit in (Units in (Playable Map Area)) and do (Actions)
    Loop - Actions
    and the leak is cleaned.

    Finally, you should know that the second case removes the unit group created, right after its reference.

    2) It's "call DestroyForce" and it's about the Player Groups. Player Groups leak, however, if you set "All players" in a variable and destroy it, you won't be able to refer to All players again.

    3) There are also:
    call DestroyTextTag(), call DestroyTimer(), call DestroyLightning(), call DestroyEffect().
    Special effects leak, like you said. A special effect that plays its death animation doesn't mean that it will be removed from the game. It's just an animation. The only way to destroy it is the line "Special Effect - Destroy". The death animation is only an animation, nothing more.

    What is more, once you create something, just because you don't see it, it doesn't mean that it's not there. Let's say you create a point once (in the Map Initialization). Just because you used it once and cannot refer it afterwards in-game (I'm speaking of a non-variabled Point), it doesn't mean that the leak cleaned itself.
    Hehe, no, I was playing with AI only, gave up with the multiplayer, but now I got back to it :]

    No, I don't moderate anything ;)
    Yes, I do play DotA, quite a lot lately (I had given up for some time).
    And yes, this is it.
    Of course you can destroy them, it's just they won't show up. Yes, using dummies with an expiration timer is the only option.
    Try a different special effect. That If/Then/Else statement is all you need to get a chance. It can fit in any occasion, be it unit creation, be it special effects creation, be it damage, anything! That line simply gives the specified actions a chance to be executed. :]

    If you destroy the special effect you create right after the creation action, it might be because that model doesn't have a death animation. Try "Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl" for example.
    Heh I'm a Chinese, how bout' you?
    Actually I had a map - Ragnarok PvP Izlude, just that it's no in thehive map section. And I'm looking forward to Starcraft II right now.
    Hello o_O Reply so I know youll get on Warcraft 3 |:) I dont wanna get on and wait forever
    Hey just go to my Forum post: Brutes and Lords to grab the map there and whats your Warcraft 3 name o_O I need to add you, you should get on Real quick and go to channel Toaster :D so I can add
    Reputation (+1):
    (Post) there was a time when I was nice, like you. That was yesterday actually, oh and last Tuesday, yes I was happy then. I don't think I was friendly on Thursday, had to watch the news.........:)
    Of course they do. If, instead of CreateUnit() function, was I using CreateUnitAtLoc(), it would leak, because it would require a location to put within the parameters. CreateUnit() takes reals (the coordinates), while CreateUnitAtLoc() takes point, which leaks.
    Well personally I don't like that thread much anyways. I'd prefer people completing the spell and posting it on their own without having organized teams (like you were doing). But that's now how the threads author wants it so..

    Anyways, thanks.
    Coordinates reflect points. A point is consisted of x,y values (and z, but that's another issue). 0,0 in the map reflects on the center of the playable map area. If you want to retrieve the coordinates of the Target Point of ability being cast, there was added in the latest patch the following: "GetSpellTargetX()" and "GetSpellTargetY()". The final "0" of the custom scripts refers to the facing you want the unit created to... face. 0 degrees in the map means that the unit will be facing east.
    Finally, if you want to get the position of the caster: "GetUnitX(GetTriggerUnit())" and "GetUnitY(GetTriggerUnit())". And no, these ones do not leak ;]
    Can you stop posting random nonsense in the spell request thread?
    I'm not sure if you're intentionally doing it or not but please only post things which are contributory and please follow the rules of the thread author, out of respect.

    Thank you.
    No, it doesn't leak, that's why I prefer that simple line. It uses coordinates, instead of points. Points leak, coordinates don't, since coordinates are reals, while points are... points.
    Hehe, thanx :]
    See, sometimes Jass is better in some stuff. I've been in your shoes, where I disliked custom scripts, but, when you get to know them, you will find them much more easier for some jobs. So, actually, in the solutions I give, sometimes it's unavoidable, not to mention it's faster to type them out, than creating a point variable, an action to create the unit and finally remove the location leak.
    Example:
    Set Point1 = (Center of (Playable Map Area))
    Unit - Create 1 Footman for Player 1 (Red) at Point1 facing 0 degrees
    Custom script: call RemoveLocation (udg_Point1)
    the above could be this simple custom script:
    Custom script: call CreateUnit (Player(0), 'hfoo', 0, 0, 0) ;)
    You store the position.. not the unit.
    I'm sure you know how to do that since you've already done the same thing elsewhere in the same trigger.
    Set Follower = (Units within 600.00 of (Position of Leader) matching (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True))

    (Position of Leader) leaks. You need to store it to a variable and do something like this;


    Set Follower = (Units within 600.00 of YourVariable matching (((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True))

    And destroy YourVariable of course.
    Hey dude send me map at later i gotta go soon to basketball game and at 5 to bday :D won't be back till like 1 AM.. so i work on the map tomorr :D was busy yesterday
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
Top