• 🏆 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] Making an item not for sale until 5 minutes after building built

Status
Not open for further replies.
Level 14
Joined
Aug 30, 2004
Messages
909
I have a merchant building that earns a profit for the player. I made an item called "recover profits" which - when purchased, gives the player 50 gold.

Here's what I want: the merchant building should accrue this item every 5 minutes up to a maximum of 5. In other words, if you build the merchant building and then wait 25 minutes, it should have 5 in stock. You should then be able to "buy" them and recover 250 gold.

When I put the item in the merchant building's "Techtree - Items made" line, the item appears fine, but starts with all 5 charges. I tried putting the "Stats - Stock Start Delay" to 400, but it still starts with 5 in stock at the start of the map.

Then I tried removing the "recover profits" item from the merchant building and then adding it manually this way:

  • Sindaran Pav Built
    • Events
      • Unit - A unit owned by Player 7 (Green) Finishes construction
    • Conditions
      • (Unit-type of (Constructed structure)) Equal to Sindaran Pavilion
    • Actions
      • Animation - Change (Constructed structure)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 40.00% transparency
      • Neutral Building - Add Recover Profits to (Constructed structure) with 1 in stock and a max stock of 5
This trigger fires fine, and the merchant building becomes semi-transparent. But the "recover profits" ability does not appear at all.

I really would have thought this is easy, but nothing seems to be working. Does anyone understand this?

------------------EDIT and UPDATE--------------

I fixed part of the problem by setting the "Stats - Can Be Sold By Merchants" to "true." This made the trigger above add "recover profits" to the merchant building. The problem remains though: even though I specified in the trigger that there should be "1" in stock, for some reason it instantly has 5.
 
Last edited:
Status
Not open for further replies.
Top