Doom Angel's Question Thread

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
i got a few question helpers will be rewarded (+Rep :D )

1)Which varibles types can have memory leaks? (Done)

2)Why if use a simple trigger point like "(Position of Triggering unit)" can still leak even though it's not in variable usage so it has no use in memory? (Done)

3)When i use Mirror Image would the Illusion count as summoned? (Done)

4)Im trying to make dummy unit cast Mirror Image and then remove it but when i do it the Illusion also goes with it (dies...) even if i change the illusion's owner is there any way leaving the mirror without the creator? (Done)

5)I tried adding Locust (Don't offer me WEU solution's) but i still can't add it i added custom script and putted in the Raw Id of Locust and still it made the unit invulnerable instead of making it unselect able here's the custom script i added if u are intrested:
Code:
Custom script:   call UnitAddAbilityBJ( 'Aloc', udg_DummyUnit )

6)Is it possible to use Locust so only owner of the unit is able to select it? (Done)

Thx for the Generous Helper :p
 

Corleone

New Member
Reaction score
44
1)
http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=27242

Types of Memory Leaks:

- Points: These are the most dangerous when making spells and movement systems with keyboard. Whenever you use the position of an object or a point of a region (Whether it be random or center), and even coordinates, they create a memory leak.
- Groups: Also a common leak, whenever you use "Unit-Group - Pick every unit..." (Also Player and Destructible etc) and you do not use a variable as the group, it will leak.
- Regions: Converting a point with a size to a region, or anything that creates an 'area' without using a region (or preset) will create a memory leak.
- Special Effects: If you do not remove a special effect (Done through a trigger, spells do not leak) it will leak. Even if the spell is finished, the data is still there.
- Strings: Strings are very minor, as they are reused. Once you use "Hi" as a string, every time you use "Hi" it uses the same data, it will not leak... but if you display random messeges (Tips that are preset are fine) it might add up, but probrably not....

6) You could trigger it.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
1-2)thx (+Rep :D )

6)can u show me any trigger as an example? (i rather GUI than Jass but if no choice then Jass is welcomed as well)

Edit: Sry can't rep u right now i will give u later
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
3.
Anything on timed life is "summoned".

4.
Do you actually have to remove him? Or, why not remove him much later, when the spell times out?

5.
Well, the custom script line is ok.

Though it should be call UnitAddAbility( udg_DummyUnit, 'Aloc' ).
No, that won't suddenly "make it work"...

Verified yet that DummyUnit actually is the dummy?

6.
No.
Locust works as locust does.

And, a trigger like
Event:
- Player 1 selects a unit
- Player 2 selects a unit
...
Conditions:
- (Triggering player) not equal to (Owner of (Triggering unit))
Actions:
- Selection - Remove (Triggering unit) from selection for (Triggering player)

Is nice and all... but not really usable...
 

Corleone

New Member
Reaction score
44
Code:
- (Triggering player) not equal to (Owner of (Triggering unit))

Triggering Unit?

I was thinking something like

Code:
Selection
    Events
        Player - Player 1 (Red) Selects a unit
        Player - Player 2 (Blue) Selects a unit
        Player - Player 3 (Teal) Selects a unit
        Player - Player 5 (Yellow) Selects a unit
    Conditions
    Actions
        Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Picked unit)) Not equal to (Triggering player)
                    Then - Actions
                        Selection - Clear selection
                    Else - Actions
                        Do nothing

Tested it ( 1 unit per player, 4 players ) and it worked.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
3.
Anything on timed life is "summoned".
and what about these summons which are not timed?
they count as a unit or a summoned?
4.
Do you actually have to remove him? Or, why not remove him much later, when the spell times out?
becuz he interupts and it doesn't gets hidden for some reason.
Verified yet that DummyUnit actually is the dummy?
yep

6) i don't think it will be very usable i already seen it in game u see it then it removes u, any possible ways of blocking them from clicking on it?
 

Corleone

New Member
Reaction score
44
6) i don't think it will be very usable i already seen it in game u see it then it removes u, any possible ways of blocking them from clicking on it?

Ah, I see. Well, there's no way to do that, AFAIK. Perma-invisi might work, but you probably want the unit to be see-able?
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
yep if i didn't wanted it visible i had no need using locust i guess :p
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Abilities that create units out of thin air always create summoned units.
At the very least, they all answer to "a unit spawns a summoned unit", even if the unit stays around until killed.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
Changes in questions:
4) i try to get my unit hidden but for some reason it won't i tried putting other unit and it did hide it can u tell me why it didnt?

5)same i still can't add the unit the locust ability
extra: can any1 tell me what BJ in Jass stands for?

Edit: 4)nvm i solved it
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
k another little question
Code:
Unit - Turn alarm generation for (Triggering unit) Off
what's that action?
Blizzard JASS. Added (in general) to functions in "Blizzard.j", hence the name.
so if i delete it it shouldn't cuz troubles cuz i never see it in the normal written jass or it's like something that like says this is a blizzard GUI made so i can't possibly delete it?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> if I delete it, it shouldn't cause troubles

On the contrary, just removing the "bj" part will cause problems no end... well, it will end on the first save, when the editor crashes.
But, just because the editor put it there doesn't mean you can't change or even break it...
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
just because the editor put it there doesn't mean you can't change or even break it...
so it is possible after all not that it realy bothers me but how would u do that? (don't tell me if it's too complicated)

Btw don't forget my little question above :p
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
5.
Unanswerable with the information given.
"UnitAddAbility(<unit>,<ability>)" does work, any unit, any ability.

"It doesn't work" is not a very good problem description.

But, well, who knows, if we had some trigger to look at...
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
"UnitAddAbility(<unit>,<ability>)" does work, any unit, any ability.
actually my when i convert a skill to jass it give me unit then the ability id but mabye it's not the problem becuz it's made the unit invulnerable so mabye i gave her wrong id even though im sure thats the right one cuz i looked is there anyway to get locust id through triggers like when u make
Code:
GetTriggeringUnitId ()
i need to get locust....
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
yea thats what i did and it gave me 'Aloc' and also im facing a new problem now i make the unit i summoned move to a point and when i move it to the point i want it sometimes does sometimes not (kinda random like)
here's the trigger:
Code:
Summoning
    Events
        Unit - A unit Spawns a summoned unit
    Conditions
        (Summoning unit) Equal to DummyUnit
    Actions
        Unit - Change ownership of (Summoned unit) to illusionOwner and Change color
        Unit - Hide (Summoned unit)
        Wait 0.20 seconds
        Unit - Move (Summoned unit) instantly to illusionPoint, facing VanisherFacing degrees
        Unit - Unhide (Summoned unit)
        Custom script:   call RemoveLocation (udg_illusionPoint)
can u try to give me a normal made Jass custom script for it? (the locust prob)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top