Jump to content
EleTD.com
Sign in to follow this  
Twilice

Finding uppgraded structure.

Recommended Posts

I don't know maybe it is just me stupid.

But I imported a spell I requested.

But it only seems to work if the tower is constructed from the builder, instead of uppgraded from another tower.

Initialisation
    Events
        Unit - A unit Finishes construction
    Conditions
        (Unit-type of (Constructed structure)) Equal to Schrapnel
    Actions
        Player - Disable Disable Book  for (Owner of (Constructed structure))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Constructed structure)) Equal to Schrapnel
            Then - Actions
                Set Locate_schrapnel = (Locate_schrapnel + 1)
                Unit - Set the custom value of (Constructed structure) to Locate_schrapnel
            Else - Actions

Is there a way to change this, or is his trigger wrong?

(there is 3 more triggers)

Share this post


Link to post

Jup, that totally messes upp the trigger.

I cant locate the unit that finnished the uppgrade.

And I think it locates unit that did an uppgrade like (Uppgrade armor to level 2)

But somehow it should work. I don't know if it must be done in jass, but I don't think so.

Karawasa might now the probem. You did Element TD :roll: and it uses something to locate the uppgraded structure.

Share this post


Link to post
Guest Jacob

Constructed unit equals to schrapnell, i saw that condition twice, im not sure whats that supposed to mean. Anyway i think it has to do with the event...

Event: a unit finishes construction (or) Event: a unit finishes an upgrade. ( im not sure if events have "or" in it.

Share this post


Link to post

1. As Jacob said, why is the condition "(Unit-type of (Constructed structure)) Equal to Schrapnel" tested twice?

2. (Events don't require an "or", just list them and any one of them will trigger the trigger)

3. How would adding "Unit - A unit Finishes an upgrade" mess it all up? Just change "Constructed structure" to "Triggering Unit" or "Upgraded structure" or anything along those lines.

4. JASS doesn't perform miracles.

Share this post


Link to post

Okay to straight things up.

1, The find unit:

When I find the uppgrading structure, for me it tries to locate a unit that uppgraded something. Like uppgraded armor. Not uppgrading itself.

2, Double condition:

ops this is my bad.

Wy? becuse I forgot to alter it before I "test" altered it.

And the test was this:

Before the first condition to run the trigger was added, it disabled the ability whenever I builded a tower.

So what happpened was that it looked like the trigger worked, but it didn't.

As I noticed when I added another condition to run the trigger for testing purposes with "uppgraded structure" I could se that the ability was not disabled.

I hope you understood the last part.

Share this post


Link to post
Guest Jacob
1. As Jacob said, why is the condition "(Unit-type of (Constructed structure)) Equal to Schrapnel" tested twice?

2. (Events don't require an "or", just list them and any one of them will trigger the trigger)

3. How would adding "Unit - A unit Finishes an upgrade" mess it all up? Just change "Constructed structure" to "Triggering Unit" or "Upgraded structure" or anything along those lines.

4. JASS doesn't perform miracles.

heh lol, i've never used 2 events in one trigger so i didnt know that ^^, anyway apart from the somewhat messy code that'd work.

2, Double condition:

ops this is my bad.

Double post :P, also your bad... yea i know the forums are slow sometimes.

Share this post


Link to post

Well in the current trigger I have the first condition.

Because the second condition never occurs if I use "a unit finnishes uppgrading" (I also change the condition ofcourse)

But before the ability got disable when any structure were constructed.

But after the first condition the ability didn't got disabled, meaning the trigger wouldn't run.

The spell itself work, but not as intended, as it counts attacks. And this trigger was to make sure they got each one different counters.

Share this post


Link to post

Unfortunately I am quite busy, so in the interest of time I will post ETD triggers relating to this in the hopes you can figure it out.

On a side note: The first trigger was recently modified hastily and perhaps rather inefficient...

Upgrade Size
    Events
        Unit - A unit Begins an upgrade
        Unit - A unit Cancels an upgrade
    Conditions
    Actions
        Unit - Remove Fire Up (Level 1) buff from (Triggering unit)
        Unit - Remove Fire Up (Level 2) buff from (Triggering unit)
        Unit - Remove Fire Up (Level 3) buff from (Triggering unit)
        Unit - Remove Spring Forward (Level 1) buff from (Triggering unit)
        Unit - Remove Spring Forward (Level 2) buff from (Triggering unit)
        Unit - Remove Spring Forward (Level 3) buff from (Triggering unit)
        Animation - Change (Triggering unit)'s size to ((Real((Point-value of (Triggering unit))))%, (Real((Point-value of (Triggering unit))))%, (Real((Point-value of (Unit-type of (Triggering unit)))))%) of its original size

Upgrade Tower Abilitites 2
    Events
        Unit - A unit Finishes an upgrade
        Unit - A unit enters (Playable map area)
    Conditions
        ((Triggering unit) is A structure) Equal to True
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Or - Any (Conditions) are true
                    Conditions
                        (Unit-type of (Triggering unit)) Equal to Forge Tower
                        (Unit-type of (Triggering unit)) Equal to Lightning Tower
                        (Unit-type of (Triggering unit)) Equal to Electron Tower
                        (Unit-type of (Triggering unit)) Equal to Solar Tower
                        (Unit-type of (Triggering unit)) Equal to Spout Tower
                        (Unit-type of (Triggering unit)) Equal to Freezing Tower
                        (Unit-type of (Triggering unit)) Equal to Vapor Tower
                        (Unit-type of (Triggering unit)) Equal to Eternal Tower
                        (Unit-type of (Triggering unit)) Equal to Pollution Tower
                        (Unit-type of (Triggering unit)) Equal to Mirage Tower
                        (Unit-type of (Triggering unit)) Equal to Decay Tower
                        (Unit-type of (Triggering unit)) Equal to Spring Tower
                        (Unit-type of (Triggering unit)) Equal to Electron Tower
                        (Unit-type of (Triggering unit)) Equal to Mortar Tower
                        (Unit-type of (Triggering unit)) Equal to Hydrochloric Tower
                        (Unit-type of (Triggering unit)) Equal to Incantation Tower
                        (Unit-type of (Triggering unit)) Equal to Flamespewer Tower
                        (Unit-type of (Triggering unit)) Equal to Wealth Tower
                        (Unit-type of (Triggering unit)) Equal to Velocity Tower
                        (Unit-type of (Triggering unit)) Equal to Phasor Tower
                        (Unit-type of (Triggering unit)) Equal to Orbit Tower
                        (Unit-type of (Triggering unit)) Equal to Mire Tower
                        (Unit-type of (Triggering unit)) Equal to Supernova Tower
                        (Unit-type of (Triggering unit)) Equal to Ice Age Tower
                        (Unit-type of (Triggering unit)) Equal to Earthshaker Tower
                        (Unit-type of (Triggering unit)) Equal to Thorns Tower
                        (Unit-type of (Triggering unit)) Equal to Witchcraft Tower
                        (Unit-type of (Triggering unit)) Equal to Monsoon Tower
                        (Unit-type of (Triggering unit)) Equal to Comet Tower
            Then - Actions
                Unit - Set level of Fire Up  for (Triggering unit) to 2
                Unit - Set level of Conjure Lightning  for (Triggering unit) to 2
                Unit - Set level of Sunburn  for (Triggering unit) to 2
                Unit - Set level of Erupt  for (Triggering unit) to 2
                Unit - Set level of Frost Helix  for (Triggering unit) to 2
                Unit - Set level of Roast  for (Triggering unit) to 2
                Unit - Set level of Afterlife  for (Triggering unit) to 2
                Unit - Set level of Contamination  for (Triggering unit) to 2
                Unit - Set level of Conjure  for (Triggering unit) to 2
                Unit - Set level of Corpse Explosion  for (Triggering unit) to 2
                Unit - Set level of Spring Forward  for (Triggering unit) to 2
                Unit - Set level of Shrapnade  for (Triggering unit) to 2
                Unit - Set level of Spew Acid  for (Triggering unit) to 2
                Unit - Set level of Faerie Fire (Custom) for (Triggering unit) to 2
                Unit - Set level of Napalm  for (Triggering unit) to 2
                Unit - Set level of Impetus  for (Triggering unit) to 2
                Unit - Set level of Focus  for (Triggering unit) to 2
                Unit - Set level of Sludge  for (Triggering unit) to 2
                Unit - Set level of Explode  for (Triggering unit) to 2
                Unit - Set level of Frostbite  for (Triggering unit) to 2
                Unit - Set level of Pulverize (Custom) for (Triggering unit) to 2
                Unit - Set level of Gaia's Wrath  for (Triggering unit) to 2
                Unit - Set level of Maledict  for (Triggering unit) to 2
                Unit - Set level of Tornado  for (Triggering unit) to 2
                Unit - Set level of Arbitrage  for (Triggering unit) to 2
                Unit - Pause (Triggering unit)
                Unit - Unpause (Triggering unit)
            Else - Actions

Share this post


Link to post
Sign in to follow this  

×
×
  • Create New...