• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Upgrades

Status
Not open for further replies.
Level 14
Joined
Nov 2, 2008
Messages
579
Greetings all.

I'm making a map which follows the Rabbits vs Sheep concept and I want to make upgrades in which lets say the sheep are upgraded. How do I make a building where human players can buy upgrades for the sheep which spawn on the opposite island and is controlled by a computer player.

+rep for help.
 
Level 30
Joined
Jan 31, 2010
Messages
3,551
Use in Object Editor (F6) on buildings:
Techtree - Researches Available
and there you put the upgrades you have done. Unfortunately, that won't work for ability buy, such as Vampiric aura. For that type of buying upgrades, make a peasant with no model, desired cost and add the ,,Locust" ability to him. Make vampiric aura ability. Add vampiric aura to last created peasant. Then do the trigger:

When unit enters the reign where is your upg shop,

If unit type of entering unit is equal to Vampiric Upg Dummy,

Create one ,,Dummy with vampiric aura" for owner of entering unit.
Add XX seconds generic expiration for last created unit. (this XX is duration of your aura)
Remove entering unit from game.

So, you got what you need. When a player purchases that peasant, he will get auras. Be careful, thought, cuz auras need to affect only specific targets, not players, too.
 
Level 30
Joined
Jan 31, 2010
Messages
3,551
Open Object Editor (F6).
Go to your Units.
Create a custom unit named Vampiric Aura Upgrade or whatever name you want.
Add gold/lumber cost to it, whatever cost is needed for it to get that upgrade.
Add locust to it, add no model to it (custom path: .mdx), add no colision, attacks, no movespeed, and flying type of moving.

Go to Abilities.
Create values of your vampiric aura.

Create another unit, get locust to it, get no model, get created vampiric aura to it, add no colision, attacks, no movespeed, and flying type of moving. It's name is Vampiric Upgrade Dummy.

Create a new region around where your shop is.
Open your Trigger Editor (F4).
Create a new trigger and call it: Vampiric Upgrade.

Events:
A unit enters ,,Vampiric Upgrade"

Condition
Unit type of >Entering unit< equals to >Vampiric Aura Upgrade<

Actions:
Create one ,,Vampiric Upgrade Dummy" for ,,Owner of Entering unit" at position of ,,Entering Unit"
Add XX seconds generic expiration to it.
Remove ,,Entering unit" from game.

The XX seconds are duration of your vampiric upgrade.
Therefore, you will not be able to purchase that ,,unit upgrade" if you are too far from shop.

Do you need anything else?
Do you understand?
 
Do what @Apheraz Lucent suggested, create a dummy unit for each player around the upgrading building and use this trigger:
  • Trigger
  • Events
    • Unit - A unit sells a unit
  • Conditions
    • (Unit-type of (Selling unit)) Equal to Upgrading Center
  • Actions
    • Player - Set the current research level of Cloud to ((Current research level of Cloud for (Owner of (Buying unit))) + 1) for (Owner of (Buying unit))
You can also use items to do that, just make sure you change the event to "Unit - A unit sells an item (from shop)".
 
Level 30
Joined
Jan 31, 2010
Messages
3,551
I suggest not using items, units are better.
Using items will prevent units without inventory to buy upgrades, or units will full item slots. So, the unit upgrades are way to better. Oh, I forgot, make their Food Used - 0.

f0rsAk3n, please close this thread if no other questions about upgrades appear. And add ,,Solved" prefix on it, so other people who search for same issue fix, can find this easily. Thanks.
 
I suggest not using items, units are better.
Using items will prevent units without inventory to buy upgrades, or units will full item slots. So, the unit upgrades are way to better. Oh, I forgot, make their Food Used - 0.

f0rsAk3n, please close this thread if no other questions about upgrades appear. And add ,,Solved" prefix on it, so other people who search for same issue fix, can find this easily. Thanks.

a) Item - Remove (Sold item) will fix the case.

b) No one but Rui (I believe) can add Solved prefix on a thread's title and/or close a thread. Finally, you have no authority to ask for a thread to be closed, unless you have a good reason, which.. you don't seem to.
 
Status
Not open for further replies.
Top