Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Box thaler chest help!
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#6
RE: Box thaler chest help!

How do you purchase the box? Do you interact with it?

The way I see it is that there's a normal box with an interaction callback on it. You click it, and it will say "You ain't got no money" if you don't have enough thalers.

If you DO have enough, it will switch out the entity. I'm unsure if you can check for a certain amount of items, but you can certainly add a variable for when you pick up some thalers. Say, you pick up 30 thalers, you run AddGlobalVarInt("Thalers", 30);

Now, when you interact with the box, it will GetGlobalVarInt("Thalers") and if it => (equals or greater than) the amount you require to buy it, run the script that switches it out. To do that, simply run SetEntityActive to disable the normal box and enable the Item version. This would also be a good time to play a coin-like sound, to indicate the purchase.

The Item version will be its own entity, set to Item > Puzzle type in the model editor. You'll need to add an icon to it (I think), but since the box is removed as you pick it up, you might as well just use the _temp_hand.tga or whatever it was called.

(This post was last modified: 12-11-2014, 09:37 PM by Mudbill.)
12-11-2014, 09:35 PM
Find


Messages In This Thread
Box thaler chest help! - by A.M Team - 12-10-2014, 09:09 PM
RE: Box thaler chest help! - by Mudbill - 12-10-2014, 09:27 PM
RE: Box thaler chest help! - by A.M Team - 12-10-2014, 10:04 PM
RE: Box thaler chest help! - by A.M Team - 12-11-2014, 07:26 PM
RE: Box thaler chest help! - by Mudbill - 12-11-2014, 12:29 AM
RE: Box thaler chest help! - by Mudbill - 12-11-2014, 09:35 PM



Users browsing this thread: 1 Guest(s)