• 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 to modify price of an item with variable ?

Status
Not open for further replies.
Level 1
Joined
Mar 20, 2008
Messages
3
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 !
 
Level 19
Joined
Nov 16, 2006
Messages
2,165
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.
 
Level 1
Joined
Mar 20, 2008
Messages
3
But the variable change with a random number so I can't envisage the new price, who is modify every 5 sec :/
 
Level 1
Joined
Mar 20, 2008
Messages
3
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.
Top