• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

How to modify price of an item with variable ?

Status
Not open for further replies.

Zarax

Z

Zarax

Hi all,

I havn't find the solution in the french community forums so I come here,

How to change the price of an item by using a variable, for example, at the beginning of the map, the sword cost 300 (where 300 = the variable X), after some time, X = 350 ... is it possible to have this new price and to sell it at the merchant shop for 350 ?

Thx !
 
I am not sure,
I think you'll need to replace those items each time.
Try using these triggers :
  • Neutral Building - Add Sword to (Triggering unit) with 5 in stock and a max stock of 5
  • Neutral Building - Remove Sword from (Triggering unit)
Although I'm not sure if it works.
Just remove the sword that costed 300, then replace (add) it with another one which costs 350.
 
But the variable change with a random number so I can't envisage the new price, who is modify every 5 sec :/
 
It's ok,

I've set the price of the item to 0.

If unitX sell itemY to shop
And ItemY = ItemY (where itemY is THE item)
PLayer -> Add VariablePriceItemY to PLayer1 gold

And that's work =)

Thx for ur help !
 
Status
Not open for further replies.
Back
Top