• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] How to adavance threw the age

Status
Not open for further replies.
Level 23
Joined
Nov 29, 2006
Messages
2,482
Well you dont really need to use any extra abilities for it.
(somehow the thing Im going to post is an advance from GhostWolfs suggestion)

Well this is what I had in mind
I suppose this is made for a mupltiplayer map, thus explaining why some of my variables consist arrays (which they normally doesnt have to).

Also note, that the unit-types stored in the variables, in the initialization trigger, are just examples :)

usevariablesav2.jpg


  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Count = (Count + 1)
      • Set FirstAgeUnitTypes[Count] = Lumber Mill
      • Set SecondAgeUnitTypes[Count] = Blacksmith
      • Set ThirdAgeUnitTypes[Count] = Workshop
      • Set Count = (Count + 1)
      • Set FirstAgeUnitTypes[Count] = Scout Tower
      • Set SecondAgeUnitTypes[Count] = Guard Tower
      • Set ThirdAgeUnitTypes[Count] = Cannon Tower
      • Set Count = (Count + 1)
      • Set FirstAgeUnitTypes[Count] = Barracks
      • Set SecondAgeUnitTypes[Count] = High Elven Barracks
      • Set ThirdAgeUnitTypes[Count] = Arcane Sanctum
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set SpecificAge[(Player number of (Picked player))] = 1
  • PlayerAdvancing
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Town Hall
          • (Unit-type of (Triggering unit)) Equal to Keep
          • (Unit-type of (Triggering unit)) Equal to Castle
    • Actions
      • Set SpecificAge[(Player number of (Owner of (Triggering unit)))] = (SpecificAge[(Player number of (Owner of (Triggering unit)))] + 1)
      • Set AdvanceEverything = (Units owned by (Owner of (Triggering unit)) matching ((((Matching unit) is A structure) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in AdvanceEverything and do (Actions)
        • Loop - Actions
          • For each (Integer A) from 1 to Count, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SpecificAge[(Player number of (Owner of (Triggering unit)))] Equal to 2
                  • (Unit-type of (Picked unit)) Equal to FirstAgeUnitTypes[(Integer A)]
                • Then - Actions
                  • Unit - Replace (Picked unit) with a SecondAgeUnitTypes[(Integer A)] using The old unit's relative life and mana
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SpecificAge[(Player number of (Owner of (Triggering unit)))] Equal to 3
                      • (Unit-type of (Picked unit)) Equal to SecondAgeUnitTypes[(Integer A)]
                    • Then - Actions
                      • Unit - Replace (Picked unit) with a ThirdAgeUnitTypes[(Integer A)] using The old unit's relative life and mana
                    • Else - Actions
      • Custom script: call DestroyGroup( udg_AdvanceEverything )
Well this was what I had in mind. If you have any questions regarding this, post it back here

And it should work, I tested it myself recently you know (100%)
/Regards =)
 
Last edited:
Level 9
Joined
Oct 17, 2007
Messages
547
I prefer to stay away from making triggers if there is another way in the editor that can do the same thing, it prevents bugs and possible lags. Copy/Pasting abilities and changing their names aren't "hard" work, but thats my oppinion.
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
hm, on the contrary, abilities made by blizzard actually leaks alittle bit.
And I made this because he asked someone to, since the other ways would take much more time to edit. Unit editor+ability editor+upgrade editor is not very "fast-friendly" if you compare to triggering (thats my opinion). Besides my trigger does not really leak more than (integer A) and condition leakage (very small leaks I would say?)

Oh and yes, I understand your perspective.
No offensive thoughts though ._. I just gave him a possible solution
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
Actually i'm quoting you on that comment GhostWolf.

In another thread of which I have been writing in too, you say that you preferred to trigger to damage an unit every x seconds, instead of making a dummy ability and dummy unit doing it.
And as well, you said that blizzards abilities were stupid

Maybe I've understood it wrong then... but cursing wont do it better
 
Last edited:
Level 9
Joined
Oct 17, 2007
Messages
547
How can triggers be more efficient then the abilities that have been writen by blizzard staff, which im 100% sure has a better understanding of the raw codes than any none-staff map makers. The abilities are only ineffecient because they have limitations not because of leaks.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Actually i'm quoting you on that comment GhostWolf.

In another thread of which I have been writing in too, you say that you preferred to trigger to damage an unit every x seconds, instead of making a dummy ability and dummy unit doing it.
And as well, you said that blizzards abilities were stupid

Maybe I've understood it wrong then... but cursing wont do it better

I do not remember saying that, but even if I didn't, its right.
They are not stupid because they leak, they are stupid because they are extremely limited (unless it was some other thing that had to do with where I said it).

And if I offended you I'm sorry, it wasn't supposed to offend in any way.

And on a side note, I'm pretty sure they (original skills) were created with C++ and not with Jass, allowing blizzard to use much better codes.

How can triggers be more efficient then the abilities that have been writen by blizzard staff, which im 100% sure has a better understanding of the raw codes than any none-staff map makers. The abilities are only ineffecient because they have limitations not because of leaks.

This has nothing to do with rawcodes.
I agree about the crappy limits. I think that as a big and respected company, they could at least not give us many not working things and many missing things.
 
Status
Not open for further replies.
Top