Economy System (Cap problem)

Got problems with your models? Struggling with textures? Get help with your custom assets.

Economy System (Cap problem)

Postby Archanor on Tue Mar 22, 2011 12:26 am

Hello,

I'm trying to make an interactive economy system that allows players to collect money around the map and spend it in shops. It is nearly complete, but there's one last thing that I can't figure out.

The system currently exists of 3 digits, which makes the maximum number 999, but it doesen't know when it hit's the maximum (making it end up at 900 after adding +1 to 999). I really would appreciate if someone could help me make some sort of a checking-system to make sure it doesen't add more money to the bank than it can actually carry.

Image

If you're interested in helping, please let me know by leaving your MSN, E-mail address or a link to your Steam profile page.

Thanks!
Archanor
Member
Member
 
Joined: Tue Dec 02, 2008 4:14 pm

Re: Economy System (Cap problem)

Postby The Giblets of Jesus on Tue Mar 22, 2011 12:28 am

What system do you having in place at the moment for adding and subtracting currency, if a math_counter is used, then you simply set a maximum value.
User avatar
The Giblets of Jesus
Regular
Regular
 
Joined: Wed Nov 24, 2010 3:24 pm
Location: Dorset (Britain)

Re: Economy System (Cap problem)

Postby darkpivot on Tue Mar 22, 2011 12:34 am

This is a really great idea, I like it. I'm not sure how much of this works so I can't help you really, sorry.
User avatar
darkpivot
Pheropod
Pheropod
 
Joined: Sun Oct 03, 2010 12:49 am

Re: Economy System (Cap problem)

Postby Archanor on Tue Mar 22, 2011 12:55 am

The Giblets of Jesus wrote:What system do you having in place at the moment for adding and subtracting currency, if a math_counter is used, then you simply set a maximum value.


I have 4 math counters in total. 1 for the bank total, and then 3 more math_counters and 3 logic_cases to make the visual counters work as they should.

The problem is that when it's at 999, the two last 99's (the tens and single units if you understand) doesen't know that it has hit the cap, and resets to 00 to start their buildup to 99 again.
Archanor
Member
Member
 
Joined: Tue Dec 02, 2008 4:14 pm

Re: Economy System (Cap problem)

Postby Gary on Tue Mar 22, 2011 2:47 am

Could you make it so when you want to change the number you have to go through a logic_relay?

logic_case(or whatever talks to the visual counter) > logic_relay > visual numbers

When the math_counters hit their max, have them fire their "OnHitMax" output to disable the logic_relay, so that the numbers can only change when under the max... sadly I can't think of a way to re-enable the logic_relay without knowing if it's under the max...

I might of misunderstood the problem...
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Economy System (Cap problem)

Postby Archanor on Wed Mar 23, 2011 4:39 am

Gary wrote:Could you make it so when you want to change the number you have to go through a logic_relay?

logic_case(or whatever talks to the visual counter) > logic_relay > visual numbers

When the math_counters hit their max, have them fire their "OnHitMax" output to disable the logic_relay, so that the numbers can only change when under the max... sadly I can't think of a way to re-enable the logic_relay without knowing if it's under the max...

I might of misunderstood the problem...

Well, it could be easier if you had a look at the VMF yourself if you're interested.

The way I spend the coins from the coinbank is by pressing a button which then triggers a logic_relay to check if there's anything in the bank before it can actually make the withdrawal.
Archanor
Member
Member
 
Joined: Tue Dec 02, 2008 4:14 pm

Re: Economy System (Cap problem)

Postby Shrinker on Wed Mar 23, 2011 9:18 pm

Damn, that bank system is a neat idea :D
User avatar
Shrinker
Been Here A While
Been Here A While
 
Joined: Fri Nov 09, 2007 5:52 pm
Location: Germany

Re: Economy System (Cap problem)

Postby Archanor on Sun Mar 27, 2011 2:41 pm

Bump. I will also release this system as a prefab at some point if anyone would be interested in helping me complete this.
Archanor
Member
Member
 
Joined: Tue Dec 02, 2008 4:14 pm

Re: Economy System (Cap problem)

Postby poisonic on Sun Mar 27, 2011 3:47 pm

i could help you out ;) its simply good use of mat counters ;) you need 3
counter 1 counts 1's for the 1 digit
counter 2 counts 10's for the 10 digit
counter 3 counts 100's for the 100 digit...
thats step 1 for the counter system ;)
the hard part is counting the money and switching all digits right ;)
in my mod the money are the experience points for the teams....
more goals and kills raises the exp points to get better guns per team
in obsidian conflict they also use an economy system ;)
[img:400]http://mypsn.eu.playstation.com/psn/profile/poisonic.png[/img]
User avatar
poisonic
Pheropod
Pheropod
 
Joined: Tue Jan 20, 2009 5:10 pm

Re: Economy System (Cap problem)

Postby Archanor on Sun Mar 27, 2011 5:00 pm

I don't think you really read all of the the thread..
Everything works fine, but it just needs a checking system so that it won't reset the "1" and "10" digit counters once it has hit 999 (which is it's maximum).

And this is just a set of entities for a certain map as of now, it's not an actual mod if that's what you're thinking.
Archanor
Member
Member
 
Joined: Tue Dec 02, 2008 4:14 pm

Re: Economy System (Cap problem)

Postby poisonic on Sun Mar 27, 2011 11:30 pm

make another counter that counts 999 :P and put a delay on firing the other counters 0.10
if the 999 counter fires disable all other counters thanks to the 0.10 delay the 1 10 and 100 counter will stop before switching to 000 ;)
[img:400]http://mypsn.eu.playstation.com/psn/profile/poisonic.png[/img]
User avatar
poisonic
Pheropod
Pheropod
 
Joined: Tue Jan 20, 2009 5:10 pm

Re: Economy System (Cap problem)

Postby BillyDa59 on Mon Mar 28, 2011 7:13 am

Couldn't you use a duo of logic_case's that check the 1's and 100's place for the value of 9? My mind is fried at the moment, as my sleep schedule has gone to hell, but I think you just need to run the logic_case's so that if the 100's place is set to "9", it relays the command the 1's place checker (logic_case) to also start checking a value of "9". If an input can pass a check that says both the 1's and 100's place are valued at "9" then... you somehow make it to where the bank, or whichever place your trying to give money to, simply will not take the money. Also, I would recommend having some way to tell the player that the bank (or whatever) cannot accept any more money.

I hope I've given you a solid solution. I tried to wrap my mind around what poisonic suggested, but like I said, I'm currently brain-dead, so I'm unable to really evaluate another person's solution.

Sorry if my idea doesn't make any sense.
BillyDa59
May Contain Skills
May Contain Skills
 
Joined: Wed Aug 02, 2006 4:27 pm
Location: United State

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users