• 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.

Need help with a trigger

Status
Not open for further replies.
Level 2
Joined
Oct 2, 2006
Messages
11
I am trying to create a trigger with does the following:
1. My Unit (Peasant) casts a spell on a building.
2. My building should advance to building (lvl 2), but not to finished buiding lvl 2 just to building lvl 2 with upgrade process at 0% or 1%.

My basic idea was to give the building a 0/10 manapool. The spell cast on the building is a replenish mana cast. Then building gets 10/10 and the trigger is initiated with the condition "when building of type xyz has mana equal to 10".

I am just startet working on the editor, but at the moment i cant figure out the right command for my trigger.
 
Level 2
Joined
Oct 2, 2006
Messages
11
Cant figure out, what the event should look like. The action and condition part look like this (but iam not sure if it is right, because the trigger wasn't triggered yet):

Event:
???

Condition:
((Ability being cast) Equal to Replenish Mana ) and (((Unit-type of (Targeted unit)) Equal to "building") and ((Mana of (Targeted unit)) Greater than or equal to 9.00))

**/The default Mana of "building" is 0/10. The spell sets it to 10/10. /**

Action:
Unit - Replace (Targeted unit) with a "building lvl 2" using The new unit's default life and mana
Unit - Set (Targeted unit) upgrade progress to 1%
 
Level 2
Joined
Oct 2, 2006
Messages
11
Event works now, but i still have problems with the actions. I am able to replace the building with building lvl2, but it is already upgraded/constructed. Also just setting the upgrade to 1% didnt work. The building stays at lvl 1, no upgrade in progress...
 
Level 2
Joined
Oct 2, 2006
Messages
11
I already did:

Action:
Unit - Replace (Target unit of ability being cast) with a building lvl 2 using The new unit's default life and mana
Unit - Set (Target unit of ability being cast) upgrade progress to 1%

But the unit is just replaced. The upgrade order is ignored.

Then i tried:

Unit - Replace (Target unit of ability being cast) with a building lvl 2 using The new unit's default life and mana
Unit - Set (Last replaced unit) upgrade progress to 1%

Same effect. No upgrade progress....

Edit: Now i see what you meant by AND...but where do i find AND? I only found the AND-connector in "Conditions", but I couldn't find it in "Actions".
 
Last edited:
Level 2
Joined
Oct 2, 2006
Messages
11
K. Found out how to do it. Just use this Line in Action:
Unit - Order (Target unit of ability being cast) to train/upgrade to a building lvl 2

Thanks to all, who helped me! ;)
 

Ralle

Owner
Level 79
Joined
Oct 6, 2004
Messages
10,183
What about this?
  • Untitled Trigger 001
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to [B]Some Skill[/B]
      • (Unit-type of (Target unit of ability being cast)) Equal to [B]Town Hall[/B]
    • Actions
      • Unit - Order (Target unit of ability being cast) to train/upgrade to a [B]Keep[/B]
 
Level 2
Joined
Oct 2, 2006
Messages
11
I did it like this. Works like it should.

  • Upgrade Trigger by Spell
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to [B]Some Skill[/B]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Target unit of ability being cast)) Equal to [B]Townhall[/B]
        • Then - Actions
          • Unit - Order (Target unit of ability being cast) to train/upgrade to a [B]Keep[/B]
        • Else - Do Nothing
 
Last edited:
Status
Not open for further replies.
Top