Quick leak question

Baltazhar

Active Member
Reaction score
55
I know 'Leaks' are probably the most used and abused topic, and I kinda feel bad just for asking about them. However, I might add, I've searched a lot of threads and several tutorials on Leaks, so it's not completely lame questions.

Since I don't know Jass, and trigger using the GUI, I have a small question about the Custom Script that I use to clean up my variables.

Code:
Set Temp_Group = (Units owned by Player 1 (Red))
Custom script:   call DestroyGroup (udg_Temp_Group)
Code:
Set Temp_Point = (Position of (Triggering unit))
Custom script:   call RemoveLocation (udg_Temp_Point)
My question to this part is: Is there a space between DestroyGroup/RemoveLocation and (udg_Temp_...)? Looking at several tutorials have just confused me, since some say with a space, and some say without a space >.<

Code:
Special Effect - Create a special effect at Temp_Point using Objects\Spawnmodels\Orc\OrcSmallDeathExplode\OrcSmallDeathExplode.mdl
Special Effect - Destroy (Last created special effect)
I know that destroying the special effect will clean up the leak, but if I do it right after the effect is created (as the code shows), will the effect be shown or just removed before it can be displayed?

Hope these aren't considered pointless question, and i'd be grateful for any help u guys/gals can give me :)

- Balt
 

The Undaddy

Creating with the power of rage
Reaction score
55
>>My question to this part is: Is there a space between DestroyGroup/RemoveLocation and (udg_Temp_...)?

As long as the compiler doesn't show errors,it's all good :cool:.When there's a bracket '()',jass usually doesn't care whether there is or isn't a space.

>>will the effect be shown or just removed before it can be displayed?

When an effect is destroyed it plays it's "death" animation.AFAIK when the special effect has no death animation,it'll finish playing it's birth animation and perish.
 

Slapshot136

Divide et impera
Reaction score
471
for the destroy special effect there are 2 types: continuous effects that wont show if you destroy them instantly (most things), and effects that are 1-time that should be deleted right after you create them.. like thunderclap. you can check which type it is by going into object editor, and then use the window on the left of the world editor to check. if it gives you a time, that's the time before it "restarts" and plays it's animation again, if it doesnt then it's a 1-time
 

Sim

Forum Administrator
Staff member
Reaction score
534
You can put a space if you want, it doesn't matter.
 

Baltazhar

Active Member
Reaction score
55
Oh thank God, that's good news. Then I won't have to go back and edit all my custom scripts :) Almost all the way through the endless hordes of triggers :p

Concerning the special effects, that's a very nice tip Slapshot. Never noticed that some have a timed animation (like 'birth'), and some don't. I'll go through the special effects and clean the up in an orderly fashion.

The Undaddy: Not sure where the compiler in WE is, I expect it checks the map when u save it? Anyway, I've been able to save and testplay my map, so nothing serious is wrong so far :)

Thx a lot for the help guys, it's nice to be reassured and get some questions answered. I think I'll just type in 'idkfa' and give u all a blast of my RepGun® :D

- Balt
 

The Undaddy

Creating with the power of rage
Reaction score
55
The Undaddy: Not sure where the compiler in WE is, I expect it checks the map when u save it? Anyway, I've been able to save and testplay my map, so nothing serious is wrong so far :)

Yep,the compiler checks when you save the map.And additional info about the effect,inspired by Slapshot's post :p.

When effects are created,they play their "birth" animations.
After that,they start playing their "stand" animations over and over.
Finally,when destroyed,they play the "death" animation.

And for that I personally prefer using dummy units for special effects :)
 

Baltazhar

Active Member
Reaction score
55
Hmm.. That isn't a halfbad idea there Undaddy. I expect u mean, making a unit with the modelfile of the desired animation, and just adding an expiration timer? That's an easy way to clean it up, but it does limit the position of the effect a little. It's easier to attach to head than calcute the flying height depending on target unit :)

But anyway, if the target is a point and not a unit, this would make it a lot easier :)
Big fan of dummy units for spells alrdy, might as well abuse them to the full potential :D

EDIT: I have a final question for that Unit-as-SpecialEffect. If I make a unit with special effect modelfile, and set the expiration timer to e.g. 2 seconds and the animation of the effect only takes .33 seconds, it will play 6 times before removed, right? It's needed to time the expiration timer to the length of the animation?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top