プレイ日記
Ed CPFace
Here's a quick function to print text as a background layer. BGPRINT Layer, X, Y, "Text" Not all characters are supported, of course.
9そうだね
プレイ済み
返信[1]
親投稿
neto ivonnesb87
could show the public key?
0そうだね
プレイ済み
返信[2]
親投稿
Soan Soan_Sabishi
This thing has functions? Oh man. Do you really need to declare I as a VAR inside the function though? Seems to work without it for me.
0そうだね
プレイ済み
返信[3]
親投稿
ChangeV ChangeV-6
I made exactly same function for one of my old games. I didn't use OPTION STRICT,so my version doesn't have VAR statement. Othar than that, it is almost same (mine uses S$ for the name of string parameter)
0そうだね
プレイ済み
返信[4]
親投稿
ChangeV ChangeV-6
I forgot that, SMILE BASIC can access string like array of character. A$[I] is same as MID$(A$,I,1) Here is shorter version. BGPUT L,X+I,Y,ASC(A$[I])
0そうだね
プレイ済み
返信[5]
親投稿
Ed CPFace
@Soan Declaring I as a variable inside the function makes it a local variable. That way, if you're using I somewhere else in your program, you won't overwrite it when you call this function. @ChangeV I didn't know that, that's awesome!
1そうだね
プレイ済み
返信[6]
親投稿
Ed CPFace
@neto The function is in lines 4-9. You just have to copy it.
0そうだね
プレイ済み
返信[7]
親投稿
Soan Soan_Sabishi
@Ed Makes sense, but what if you use VAR outside the function? Does it become a global variable or variable that can't be used inside a function? lol @ChangeV I've been drawing parallels to Python ever since I started playing around in SmileBASIC. It's good to know arrays can be used like that.
1そうだね
プレイ済み
返信[8]
親投稿
zag Tall-T
How do I load my maps layers all at the same time?
0そうだね
未プレイ