• 🏆 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!

[General] Units in the shop require teechtree upgrade.

Status
Not open for further replies.
Level 2
Joined
Jun 19, 2011
Messages
24
Hello, can someone help me? I'm making something like a war, where you buy units from the shop and the spawn and move towards enemy base. But i got one serious problem. :goblin_cry:


I want to build/upgrade something to allow buying units.
(if i want to buy and spawn footmen, i need to upgrade metal works)

So how do i do that ? :goblin_wtf:
 
Last edited:
Level 2
Joined
Jun 19, 2011
Messages
24
I have already tried it. Still a unit is beeing bought not trained. So it does not require that upgrade. ;) this is my problem. You can actually buy all units , skipping their requirments. ;)
 
Level 2
Joined
Jun 19, 2011
Messages
24
How would you do this ? Can you post a quick trigger ?
Like adding a unit to an shop? ... But i would like to already have unit in the shop but it should be disabled. Like normal unit in barracks with required upgrade ;)
 
Level 2
Joined
Jun 19, 2011
Messages
24
In the object editor, there should be a techtree upgrades required for the items/units/upgrades delete everything in there and you can just uncheck the check requirements box. Hope this resolves your problem :)

Mhm, but how this will help me ? I want to units in a shop require an upgrade.
Like to buy an Archer i need to invent arrows. Like buy an upgrade before.
 
Level 7
Joined
Sep 11, 2013
Messages
220
hmm..

Make it an Item in the shop called (FOOTMAN) that is sold for 0 gold and lumber.
Then add it in description that it needs UPGRADE and is sold for (VALUE) gold.

If unit sells an item.

If item is equal to FOOTMAN

If current research level of UPGRADE for player is equal to 1 and has more than or equal to (VALUE) gold.

then remove item (FOOTMAN) from buying unit, create a footman at position of SHOP for player, set gold of player to gold - (VALUE)

Else, remove item (FOOTMAN) from buying unit.

Thats all I can help you with, I dont know how to do disabled versions, srry :(
 
Level 2
Joined
Jun 19, 2011
Messages
24
Then what about you make custom technology(arrows) from a technology(upgrade) again from object editor and set the necessary stats then go to the archer unit and set the techtreee requirment to(arrows) that should do it i think

I think you don't get what i want to do :D

Im npt training units , I'm BUYING THEM FROM THE SHOP.
The thing is that you can buy everything you want.
And i want to do some requirments to buy that unit ;)
:eekani:
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
I think you don't get what i want to do :D

Im npt training units , I'm BUYING THEM FROM THE SHOP.
The thing is that you can buy everything you want.
And i want to do some requirments to buy that unit ;)
:eekani:

Set them to be made items, not units. Then if a suitable item is bought you remove the item and create a unit.
(Made items are like trained unit, as in, they can require upgrades. But unlike units, they are instant)
 
Level 19
Joined
Apr 21, 2013
Messages
1,194
now i get it okay :D i'm gonna look for a solution but it'll be like this i think

hmm..

Make it an Item in the shop called (FOOTMAN) that is sold for 0 gold and lumber.
Then add it in description that it needs UPGRADE and is sold for (VALUE) gold.

If unit sells an item.

If item is equal to FOOTMAN

If current research level of UPGRADE for player is equal to 1 and has more than or equal to (VALUE) gold.

then remove item (FOOTMAN) from buying unit, create a footman at position of SHOP for player, set gold of player to gold - (VALUE)

Else, remove item (FOOTMAN) from buying unit.

Thats all I can help you with, I dont know how to do disabled versions, srry :(
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
You can skip the remove item step and just make the item a powerup aka use it on acquisition

I don't recommend that. Have you ever seen what happens when a tome is used up?

now i get it okay :D i'm gonna look for a solution but it'll be like this i think

Made items(not sold) can have techtree requirements, elseway, yeah.
 
Level 2
Joined
Jun 19, 2011
Messages
24
So, how would i do that ? I should put items to a shop, and when i buy an item lets say called: footman, it will spawn with triggers? ...

As i did , is simple shop with units, i buy some, trigger removes bought units , and creates them in the base , they auto-attack an enemy base>

its simple, but now i shoud make items, and when i buy them , units will spawn?
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
So, how would i do that ? I should put items to a shop, and when i buy an item lets say called: footman, it will spawn with triggers? ...

As i did , is simple shop with units, i buy some, trigger removes bought units , and creates them in the base , they auto-attack an enemy base>

its simple, but now i shoud make items, and when i buy them , units will spawn?

The unit spawning should be triggered.
The techtree requirements can easily be done with object editor(items can have them, if put in the "Made" list)
 
Status
Not open for further replies.
Top