Hero select, leak

slayer

New Member
Reaction score
2
Hello!
I am currently trying to get rid of and remove leaks from my map. This trigger does not work after removing the leak from it, why? :confused:

Improved one:

Alchemist
Events
Unit - A unit enters HEROAlchemist <gen>
Conditions
(Unit-type of (Triggering unit)) Equal to Hero Select
Actions
Set L = (Center of HeroStartPoint <gen>)
Unit - Create 1 Alchemist for (Triggering player) at L facing Default building facing degrees
Unit - Remove (Triggering unit) from the game
Custom script: call RemoveLocation(udg_L)

Although, when I last checked with leak checker, it still says "Location variable has not been removed" What seems to be the problem there? (btw, thanks for leak checker Im_On_56k :thup: )

Original one with leak that does work:

Alchemist
Events
Unit - A unit enters HEROAlchemist <gen>
Conditions
(Unit-type of (Triggering unit)) Equal to Hero Select
Actions
Unit - Create 1 Alchemist for (Triggering player) at L facing Default building facing degrees
Unit - Remove (Triggering unit) from the game
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
I guess leak checker tells you that the leak is still there because you haven't nulled L. But that isn't necessary because it'll override itself on the next use.

No idea why the trigger doesn't work. I've made a swift test myself and it worked fine. Does the whole trigger not execute? Or is it only a part (e.g. the Triggering Unit doesn't get removed, but the hero spawns)?
 
1

131ackout

Guest
Well, I copied this from a tutorial.

Code:
Choose Hero 1
    Events
        Unit - A unit enters Hero 1 Region 
    Conditions
        ((Unit-type of (Triggering unit)) Equal to Wisp) and (Pick_Taken[1] Equal to 0)
    Actions
        Set Pick_Taken[1] = 1
        Unit - Hide Demon Hunter 0001
        Unit - Create 1 Demon Hunter for (Owner of (Triggering unit)) at (Center of Start Region ) facing Default building facing degrees
        Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Start Region ) over 0.00 seconds
        Unit - Remove (Triggering unit) from the game

Choose Hero 2
    Events
        Unit - A unit enters Hero 2 Region 
    Conditions
        ((Unit-type of (Triggering unit)) Equal to Wisp) and (Pick_Taken[2] Equal to 0)
    Actions
        Set Pick_Taken[2] = 1
        Unit - Hide Sorceress 0002
        Unit - Create 1 Sorceress for (Owner of (Triggering unit)) at (Center of Start Region ) facing Default building facing degrees
        Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Start Region ) over 0.00 seconds
        Unit - Remove (Triggering unit) from the game

The variable Pick_Taken and "Hide" are what you don't need..
 

slayer

New Member
Reaction score
2
I guess leak checker tells you that the leak is still there because you haven't nulled L. But that isn't necessary because it'll override itself on the next use.

No idea why the trigger doesn't work. I've made a swift test myself and it worked fine. Does the whole trigger not execute? Or is it only a part (e.g. the Triggering Unit doesn't get removed, but the hero spawns)?

Yeah thats funny actually, the 'hero select' unit is removed, but no hero appear.
 
1

131ackout

Guest
> AdamGriffith'

Again.. Luckily, there is "Triggering Player"....

It's based on the conditions or events, w/e.

Look for it.
 

slayer

New Member
Reaction score
2
There is no Triggering player.

Alchemist
Events
Unit - A unit enters HEROAlchemist <gen>
Conditions
(Unit-type of (Triggering unit)) Equal to Hero Select
Actions
Unit - Create 1 Alchemist for (Triggering player) at L facing Default building facing degrees
Unit - Remove (Triggering unit) from the game

this one does work, although it is leaking, isnt that weird? :confused:
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
Got it.
Code:
Unit - Create 1 Alchemist for (Triggering player) at L facing Default building facing degrees
is wrong. It must be
Code:
Unit - Create 1 Alchemist for Owner of (Triggering player) at L facing Default building facing degrees

Damn, second D:
 

slayer

New Member
Reaction score
2
Well, I copied this from a tutorial.

Code:
Choose Hero 1
    Events
        Unit - A unit enters Hero 1 Region 
    Conditions
        ((Unit-type of (Triggering unit)) Equal to Wisp) and (Pick_Taken[1] Equal to 0)
    Actions
        Set Pick_Taken[1] = 1
        Unit - Hide Demon Hunter 0001
        Unit - Create 1 Demon Hunter for (Owner of (Triggering unit)) at (Center of Start Region ) facing Default building facing degrees
        Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Start Region ) over 0.00 seconds
        Unit - Remove (Triggering unit) from the game

Choose Hero 2
    Events
        Unit - A unit enters Hero 2 Region 
    Conditions
        ((Unit-type of (Triggering unit)) Equal to Wisp) and (Pick_Taken[2] Equal to 0)
    Actions
        Set Pick_Taken[2] = 1
        Unit - Hide Sorceress 0002
        Unit - Create 1 Sorceress for (Owner of (Triggering unit)) at (Center of Start Region ) facing Default building facing degrees
        Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Start Region ) over 0.00 seconds
        Unit - Remove (Triggering unit) from the game

The variable Pick_Taken and "Hide" are what you don't need..

thanks, but if I remove Pick_Taken and "Hide", isn't it the same script then?
 

AdamGriffith

You can change this now in User CP.
Reaction score
69
@ s3rius
Congratulations.
You can copy what I said.

Just change it to owner of triggering unit please.

Also, what is L in this trigger?
Code:
Original one with leak that does work:

Alchemist
Events
Unit - A unit enters HEROAlchemist <gen>
Conditions
(Unit-type of (Triggering unit)) Equal to Hero Select
Actions
Unit - Create 1 Alchemist for (Triggering player) at L facing Default building facing degrees
Unit - Remove (Triggering unit) from the game
 
1

131ackout

Guest
Don't worry, the "Pick_Taken" is just a variable you don't know, so just create like this:

Code:
Choose Hero 1
    Events
        Unit - A unit enters Hero 1 Region 
    Conditions
        ((Unit-type of (Triggering unit)) Equal to Wisp) and (Pick_Taken[1] Equal to 0)
    Actions
        Unit - Create 1 Demon Hunter for (Owner of (Triggering unit)) at (Center of Start Region ) facing Default building facing degrees
        Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Start Region ) over 0.00 seconds
        Unit - Remove (Triggering unit) from the game
The person who made this wanted to have their OWNED hero arena to be hided and working on the Pick_Taken variable.
 

slayer

New Member
Reaction score
2
Got it.
Code:
Unit - Create 1 Alchemist for (Triggering player) at L facing Default building facing degrees
is wrong. It must be
Code:
Unit - Create 1 Alchemist for Owner of (Triggering player) at L facing Default building facing degrees

Damn, second D:

thanks man! +rep ;)
 

AdamGriffith

You can change this now in User CP.
Reaction score
69
Quote:
Originally Posted by AdamGriffith View Post
There is no Triggering player.
Alchemist
Events
Unit - A unit enters HEROAlchemist <gen>
Conditions
(Unit-type of (Triggering unit)) Equal to Hero Select
Actions
Unit - Create 1 Alchemist for (Triggering player) at L facing Default building facing degrees
Unit - Remove (Triggering unit) from the game

this one does work, although it is leaking, isnt that weird?
Reply With Quote

But you didn't read it so how did you post that reply?
I wonder?
Sorry,
Cyar
 

Exide

I am amazingly focused right now!
Reaction score
448
But you didn't read it so how did you post that reply?
I wonder?
Sorry,
Cyar

I dunno who wrote that trigger originally, but there is no (Triggering Player) in that trigger. :p
(Post number 18)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top