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

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