Jump to content
Sign in to follow this  
Gavin McStine

Trade 5 items for 1 issue

Recommended Posts

I'm trying to make a trade system where you can exchange 5 ore for 1 ingot.

 

If you have 0 ore it will say you need 5 ore to make 1 ingot. - Ok

If you have 5(or more) ore it will make 1 ingot from 5 ore. - Ok

 

If you have 1 to 4 ore it will still make 1 ingot. - Not ok.

 

Trade.gif

Share this post


Link to post
Share on other sites

Set a variable to the amount of iron ores you have

then set a conditional branch to see if that variable is higher or lower than 5, is it lower: show the message, is it higher, make 1 ingot and decrease 5 ores.

Share this post


Link to post
Share on other sites

Also echoing what The Harmp said.

 

Control Variable [0001: Number of Ores] = [Ore] in inventory

Conditional Switch: Variable [0001] >=5

  Change Items: [Ore] - 5

  Change Items: [ingot] + 1

Else

  Show Text "You don't have enough ore."

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×