• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Upgrade Tiers triggering Triggers

Status
Not open for further replies.
Level 8
Joined
Sep 9, 2007
Messages
114
Heres what i'd like to happen:
Example:

Event:
Unit finishes an upgrade

Condition:
Unit belongs to Player 1 (Red)
(Researched Tech-Type) equal to Iron Forged Swords (This is a the thing in game that humans train from Blacksmith to increase thier damage but this time optimized to upgrade nothing)

Action:
Turn on Trigger (Blah1)
Turn on Trigger (Blah2)

Then when i upgrade the second tier portion of it (So now it'd be Thorium Forged Sword) I want it to
Turn off Trigger (Blah1)
Turn off Trigger (Blah2)
Turn on Trigger (Bloo1)
Turn on Trigger (Bloo2)

I'm sure it can be done... but i'm having difficulty figuring out how. :nemor: Thanks again HWS community I've been full of questions lately, and with all your help I've been able to keep a steady pace on my current project.
 
Level 9
Joined
Oct 17, 2007
Messages
547
I have no idea what you want to happen O_O.. do you want to turn on a number of triggers for first level of the upgrade? then turn off a few other triggers in the 2nd one?
 
Level 8
Joined
Sep 9, 2007
Messages
114
Damn, alright well let me try to explain without overwhelming info...

Basically Lets say You upgrade something
Player Red Upgrades (Unit ability 1 Upgrade)
Give all units of X type Y ability

Player Red Upgrades (Unit Ability 2nd Upgrade)
Give all units of X type Z ability (Now they have both abilities)
 
Level 9
Joined
Oct 17, 2007
Messages
547
You can do it the easy way using just the Object editor or the more Complicate way using Triggers.

First Technique:
-Customize an upgrade, lets call it "Spells"
-Customize a few abilities, lets call them Teir1 A, Teir1 B,Teir2 A and Teir2 B
-Now for Teir1 A and Teir1 B, go to the Abilities tab and change a few values:
-Techtree - Check Dependencies "True"
-Techtree - Requirements "Spells"
-Techtree - Requirements - Levels "1"
-For Teir2 A, Teir2 B change these values for them:
-Techtree - Check Dependencies "True"
-Techtree - Requirements "Spells"
-Techtree - Requirements - Levels "2"
-Go to the Units tab and give all the units you want those abilities

The abilities will always show up on the unit but it can't use unless "Spells" is upgraded to lv 1 or 2.

Second Technique:
  • Events -
  • A unit finishes research
  • Conditions -
  • (Current research level of Spells for (Owner of (Triggering unit))) Greater Than or Equal to 1
  • Actions -
  • Set TempUnitGroup = Units owned by (Owner of (Triggering unit) of type Caster
  • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current research level of Spells for (Owner of (Triggering unit)))Equal to 1
        • Then - Actions
          • Unit - Add Teir1 A to (Picked unit)
          • Unit - Add Teir1 B to (Picked unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current research level of Spells for (Owner of (Triggering unit)))Equal to 2
        • Then - Actions
          • Unit - Add Teir2 A to (Picked unit)
          • Unit - Add Teir2 B to (Picked unit)
        • Else - Actions
  • Custom script: call DestroyGroup(udg_TempUnitGroup)
Keep in mind that you will need to add the spell manually everytime u create a new unit, either by training or usign triggers
 
Status
Not open for further replies.
Top