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

How do I make one upgrade disable another?

Status
Not open for further replies.
Level 4
Joined
Feb 4, 2008
Messages
70
Okay, it's like this; say I have a gnoll, and I make two upgrades based on the Berserker Upgrade (the one that turns headhunters to berserkers), for exmple, the first one turns my gnoll into an ogre and the second one turns my gnoll into a golem.

This works fine, I have tried. However, when I research the ogre upgrade, I want to make the golem upgrade unavaible (and vice versa), atm I can research both but my unit only gains benefit from the first one.

  • Events
    • Unit - A unit finishes an upgrade
  • Conditions
    • (Researched tech-type) Equal to MyFirstUpgrade
  • Actions
    • Player - Set the max research level of MySecondUpgrade to 0 for (Owner of(Triggering Unit))
(This did not work)

Help would be utterly appretiated.
 
Last edited:
Level 6
Joined
Jul 25, 2005
Messages
221
I believe that instead of using research based on berserker, try using a normal spell that uses a trigger like:

  • MorphAltOne
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to MorphSpell1
  • Actions
    • Unit - Remove ( Triggering Unit )
    • Unit - Create (MorphUnit) at Position of (Triggering Unit)
    • Unit - Set ( Last Created Unit)'s life equal to (Triggering Unit)'s life
    • Unit - Set ( Last Created Unit)'s mana equal to (Triggering Unit)'s mana
    • Unit - Add ability ( MorphAltTwo ) for (Last Created Unit)
    • Special Effect - ( Insert some cool flashy effect here )
 
Level 4
Joined
Feb 4, 2008
Messages
70
not max research level...
just research level. try

Didn't work :/

I believe that instead of using research based on berserker, try using a normal spell that uses a trigger like:

  • MorphAltOne
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to MorphSpell1
  • Actions
    • Unit - Remove ( Triggering Unit )
    • Unit - Create (MorphUnit) at Position of (Triggering Unit)
    • Unit - Set ( Last Created Unit)'s life equal to (Triggering Unit)'s life
    • Unit - Set ( Last Created Unit)'s mana equal to (Triggering Unit)'s mana
    • Unit - Add ability ( MorphAltTwo ) for (Last Created Unit)
    • Special Effect - ( Insert some cool flashy effect here )

Sorry, I was a bit unclear in my first post.

You have a base that continually spawns Units (Much like Footman wars/frenzy) and from that base you will be able to increase hitpoints, armor etc of your units, and upgrade them to other units.

Here comes the problem; I do not want all the players to just upgrade to the same units so I am trying to make a point in my techtree among the the units where you can choose to either get ranged or melee units, and the upgrade must cost gold.
 
Level 6
Joined
Aug 13, 2008
Messages
197
i believe what RunBa means is -player- set current research level. hope it helps, but i havent tried it myself.
hmm the way mention below would cost a lot of triggering work. a easier way is to use array to store the variables.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
If all the rest doesn't work, you could do the following:

Research 1: requirements (none)
Research 2: requirements (a certain dummy unit which is placed on the map)

When research 1 is researched (detect it with a trigger), remove the dummy unit from the map. Research 2 will now no longer be able to be researched
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
qbrtux, the action works perfectly, but your event makes no sense.

Your current event triggers when a unit upgrades (like a scout tower to gaurd tower) and not when a unit finishes researching.
Change your event to a unit finishes Researching (may have to scrole down in the event chooser for a unit) and it should atleast have a better chance of working.

EDIT
Eleandor, that is the problem he is having. He is not having problem stopping the tech from being researched, he is having problem getting the event to fire and pass the conditions to fire the action to prevent it from being researched.
 
Level 4
Joined
Feb 4, 2008
Messages
70
qbrtux, the action works perfectly, but your event makes no sense.

Your current event triggers when a unit upgrades (like a scout tower to gaurd tower) and not when a unit finishes researching.
Change your event to a unit finishes Researching (may have to scrole down in the event chooser for a unit) and it should atleast have a better chance of working.

EDIT
Eleandor, that is the problem he is having. He is not having problem stopping the tech from being researched, he is having problem getting the event to fire and pass the conditions to fire the action to prevent it from being researched.

Oh... now you made me feel stupid :/ Thanks a lot! It worked perfectly.

And thank you, everyone else who tried to help me! :DD

Edit: How do I mark this thread solved? :p
 
Status
Not open for further replies.
Top