トピック
Clayton DarkClay88

Program Help!

Ok, so I have a shop in my game, and it is in a separate loop instead of it being in the same loop for the gameplay. My question is, how can I buy something in that shop and it applies to the gameplay loop?
4そうだね
プレイ済み
返信[1]
親投稿
Aaron Krondelo
Easy, just use a global variable. Initialize it once in the beginning.Like MONEY=10:POTIONS=0. In your shop loop just do this IF MONEY>=3 THEN INC POTIONS; MONEY=MONEY-3;WAIT 5 after selecting item.
1そうだね
プレイ済み
返信[2]
親投稿
Aaron Krondelo
I left out exact syntax, I think you know what I mean though.
0そうだね
プレイ済み
返信[3]
親投稿
Clayton DarkClay88
Like if I was to press A on an thing I want to buy, I would do, IF BUTTON() AND #A THEN ITEM=ITEM+1 ENDIF Then outside the shop loop I do something like, IF ITEM==1 THEN SPSET 0,50,50 ENDIF
0そうだね
プレイ済み
返信[4]
親投稿
Clayton DarkClay88
Oh wait, I got it, thanks for your help! Btw, do you know how to do a vertical scroll effect for a GPUTCHR and making it stop in the middle of the screen?
0そうだね
プレイ済み
返信[5]
親投稿
Aaron Krondelo
Good, np! Try GPUTCHR PX,PY,“string" then decrement the PY value in a loop to scroll the text up.
1そうだね
プレイ済み
返信[6]
親投稿
Aaron Krondelo
Here I believe this is what you're looking for.
1そうだね
プレイ済み
返信[7]
親投稿
Clayton DarkClay88
It worked! I changed it by decreasing X instead of increasing Y for a cool effect that you will see soon. ;) One more question please. XD I know how to use Fade like... FADE RGB(0,0,0),100 But how do I fade it back to normal? Like a fade-out.
0そうだね
プレイ済み
返信[8]
親投稿
Aaron Krondelo
Sorry that I dont know.
0そうだね
プレイ済み
返信[9]
親投稿
Clayton DarkClay88
Its fine. :)
0そうだね
プレイ済み