NO MONEY YET BUYING STUFF
Posts
Pages:
1
Let's say I have a pub.
I have an event where you can either buy a room or a drink, using a fork and some variables so you stop buying drinks after 5 or so.
However, if I start off with 0 coins, I can still buy a drink, which is supposed to cost money.
How do I make it so that I can't buy a drink when I have no money?
I have an event where you can either buy a room or a drink, using a fork and some variables so you stop buying drinks after 5 or so.
However, if I start off with 0 coins, I can still buy a drink, which is supposed to cost money.
How do I make it so that I can't buy a drink when I have no money?
What maker?
Anywho, the general idea is:
Set Variable 0001 = Money
Branch If Var 0001 <= 0
<> Msg "GTFO loser!"
Else
<> buy a drink
End if
Anywho, the general idea is:
Set Variable 0001 = Money
Branch If Var 0001 <= 0
<> Msg "GTFO loser!"
Else
<> buy a drink
End if
Sorry that'd be RM2k.
And I'm not that good with variables, could you explain a little more in-depth?
And I'm not that good with variables, could you explain a little more in-depth?
On page one, there is the Variable Operations event
Select new a variable (say, 0018) and call it Moneys
Set Equal
Other > Money
Third page, there is the Conditional Branch event
Variable > 0018: Moneys
Number 0
Less than or equal to
x Execute Custom Handler if condition not met
In the first section of the conditional branch, do something like "You don't have enough cash!"
In the section section proceed normally for your drink buying code.
Select new a variable (say, 0018) and call it Moneys
Set Equal
Other > Money
Third page, there is the Conditional Branch event
Variable > 0018: Moneys
Number 0
Less than or equal to
x Execute Custom Handler if condition not met
In the first section of the conditional branch, do something like "You don't have enough cash!"
In the section section proceed normally for your drink buying code.
What I ended up doing was adding a switch with a fork, so when I got my "allowance" it'd turn the money switch on, and then I made another fork at the pub.
What if the player spends his allowance before getting to the pub? Also, what is a kid who still gets an allowance doing at a pub?
Even better: RM2k3 has a conditional branch option on the first page at the bottom, select the the radio button that says "Money is at least _". Make sure you check the box to "Execute Custom Handler if Condition is not Met."
Then set commands for if the player has enough money under the first handler (remember to subtract the amount of money you said the interaction costs), and if the player doesn't in the second handler (i.e. "If you don't got no money, get out of my store, punk.")
Saves yourself an extra variable.
Then set commands for if the player has enough money under the first handler (remember to subtract the amount of money you said the interaction costs), and if the player doesn't in the second handler (i.e. "If you don't got no money, get out of my store, punk.")
Saves yourself an extra variable.
Interesting thing though, one time I got to work on this idea for an epic game, and I figured I'd need like 3000 switches and 3000 variables, so I set the arrays to those amounts in advance. Turns out, merely having that many switches/variables in my array made my game do the laggy thing that too many parallel processes or too many pictures causes.
Ever since, if there's a way out of using a switches/variables or recycling them, I take it. Since my scope explodes whenever I make a game, I am a slave to optimization.
Ever since, if there's a way out of using a switches/variables or recycling them, I take it. Since my scope explodes whenever I make a game, I am a slave to optimization.
I don't have rm2k3, just rm2k.
2000.
Not 2003.
Oh and btw this is a fantasy middle-ages game. I should change it from "allowance" lol... :)
I never really figured out variables, just switches.
Just started to get back into RPG Maker after like a year of absence as well..
2000.
Not 2003.
Oh and btw this is a fantasy middle-ages game. I should change it from "allowance" lol... :)
I never really figured out variables, just switches.
Just started to get back into RPG Maker after like a year of absence as well..
Yes, but I don't have variable operations or conditions branch.
They're like fork conditions and change variable.
So it's kinda confusing.
They're like fork conditions and change variable.
So it's kinda confusing.
Pages:
1














