プレイ日記
BoogerFace BlueDog100
May someone plz Tell me how to make rpg's Please? :_( (How to control a sprite, Make it move,Make enemies attack Etc.) Help please.:(
3そうだね
プレイ済み
返信[1]
親投稿
☆CodeZeяo☆ Code-Zero-666
ok my friend this will take several post but here it goes.
1そうだね
プレイ済み
返信[2]
親投稿
☆CodeZeяo☆ Code-Zero-666
Sprites Make a main loop such as @mainloop gosub @playersetup gosub @move Gosub @bg Gosub @background goto @mainloop In other post I will explain every Gosub.
2そうだね
プレイ済み
返信[3]
親投稿
☆CodeZeяo☆ Code-Zero-666
@playersetup Spset 0,sp spofs 0,x,y spscale whatever size you want the sprite to be (Spscale 0,2,2) return
2そうだね
プレイ済み
返信[4]
親投稿
☆CodeZeяo☆ Code-Zero-666
@move vysnc 1 b=button() if b==1 then y=y-1:spchr 0, (the control number for the sprite that appears to be moving up) if b==2 then y=y+1:spchr 0, (the control number for the sprite that appears to be moving down) if b==4 then x=x-1:spchr 0, (the control number for the sprite that appears to be moving left) if b==8 then x=x+1:spchr 0, (the control number for the sprite that moves right)
2そうだね
プレイ済み
返信[5]
親投稿
☆CodeZeяo☆ Code-Zero-666
Add a return to the end of that one I forgot what bg was XDDDD so lets move on to @background You can do what you like just type in Bgfill then read what it has to say ^_^ if you want to create boundaries then simply type Print "X- ";x print "y- ";y then when you have your sprite moving look at where the X and Y are at and make this If x<(number) then x=x-1 Experiment ^_^
2そうだね
プレイ済み
返信[6]
親投稿
☆CodeZeяo☆ Code-Zero-666
Now making enemies i am certainly not a pro at but... I'll give you my best advice. So if you're making an enemy system that consist of you running into them I have NO CLUE (i'm sorry...) However if you want to make a classic style Walk a certain number then you run into an enemy then do this :
2そうだね
プレイ済み
返信[7]
親投稿
☆CodeZeяo☆ Code-Zero-666
In your mainloop add another branch so... @mainloop gosub @playersetup gosub @move Gosub @bg Gosub @background Gosub @enemycount goto @mainloop then-
2そうだね
プレイ済み
返信[8]
親投稿
☆CodeZeяo☆ Code-Zero-666
Okay so back track go back to where you made your player move ^_^ add to every command in that branch if b==1 then y=y-1:spchr 0,(number):steps=steps+1 now go to your @enemycount vysnc 1 if steps>50 then steps=0:beep 4:gosub @enemy return
2そうだね
プレイ済み
返信[9]
親投稿
☆CodeZeяo☆ Code-Zero-666
@enemy (lets say you want to make it totally random) ene=rnd(5) If ene==1 then gosub @level5e If ene==2 then gosub @level10e If ene==3 then gosub @level15e If ene==4 then gosub @level20e If ene==5 then gosub @level25e return
1そうだね
プレイ済み
返信[10]
親投稿
☆CodeZeяo☆ Code-Zero-666
@level5e Enemylevel=5 EHP=Enemylevel+5 ESP=Enemyleve+15 Eatk=enemylevel+25 Edf=enemylevel+25 Goto @battle
2そうだね
プレイ済み
返信[11]
親投稿
☆CodeZeяo☆ Code-Zero-666
Wait before we go any further do you understand it so far ^_^
2そうだね
プレイ済み
返信[12]
親投稿
C. Norris 06495a
If you want a battle to happen on contact you could do this: Spset 1,sp 'sets enemy sprite Spcol 1,true 'sets a hit box If sphitsp(0,1,1)>0 then ' put the battle here Endif
0そうだね
プレイ済み
返信[13]
親投稿
PChicken NerdChicken
do you know how to make at least a simple text-based game?
0そうだね
プレイ済み
返信[14]
親投稿
C. Norris 06495a
Completely out of context, @philip I thought you were me! What are the odds of that! (Same name)
0そうだね
プレイ済み
返信[15]
親投稿
mystman12 mystman12
While the general idea of that code is right, I spotted a few of flaws. For one, do NOT put SPSET in a loop. There's no reason why you need to initiate the sprite every frame. Also, put VSYNC 1 on the line after @MAINLOOP, rather than in the GOSUBS. Also, instead of IF B==# for input, do IF B AND #. This will allow multiple inputs at a time. Hopefully you understand what all this means. If...
1そうだね
プレイ済み
返信[16]
親投稿
mystman12 mystman12
you don't, you may want to consider taking a step back and starting with something simpler. An RPG uses a ton of different programming concepts, and it's crucial you understand what you're actually doing, else things will get really frustrating really fast. In my opinion, before starting on a big project, I think you should know enough about programming to be able to figure most stuff out yourself
0そうだね
プレイ済み
返信[17]
親投稿
BoogerFace BlueDog100
@phillip no i do not @Zero Yes I mostly do.:)
2そうだね
プレイ済み
返信[18]
親投稿
MSWS coolestkid123
@mystman12 Thanks ALOT for saying why people do IF B AND * I didn't know why they didn't just do IF B==#* but now I know!
2そうだね
プレイ済み
返信[19]
親投稿
PChicken NerdChicken
Adventurer, what I meant by the text-based game question is that you need to know how to program something and program it well before you can make that something worthwhile. You need to start from the basics, with simple input, print, and if commands.
0そうだね
プレイ済み
返信[20]
親投稿
BoogerFace BlueDog100
I've actually been wanting to make a text based rpg,I'd be happy if you could tell me how
0そうだね
プレイ済み
返信[21]
親投稿
PChicken NerdChicken
adventurer, even a text based rpg is above your level right now. you need to press the command reference button on the smilebasic keyboard and check through all the commands and try them out.
1そうだね
プレイ済み