トピック
*J.P.*[P]£ aj2003aj

*helping anyone in need of coding help*/freely talk here/helping give game ideas/anything. discussion#3!!

this is a multipurpose discussion! i will respond relatively fast depending on the time (e.g. from 1pm to 3am) if you need coding help comment here, if you need ideas for your game, comment here. if you want to talk, comment here! -please if i didn't list why your here, comment here.
10そうだね
プレイ済み
返信[1]
親投稿
Scientist Speedy1101
When I get to the part, I will add stars to the background in Lasership 2's gameplay. How do I make stars appear to move to the left as if the ship were flying through space to the right?
0そうだね
プレイ済み
返信[2]
親投稿
*J.P.*[P]£ aj2003aj
it depends, are the stars sprites or are they graphics?
0そうだね
プレイ済み
返信[3]
親投稿
JAGMAN316 Jadwad
Hello
0そうだね
プレイ済み
返信[4]
親投稿
*J.P.*[P]£ aj2003aj
sup.
0そうだね
プレイ済み
返信[5]
親投稿
Scientist Speedy1101
I would like to make them graphics because I'm going to need all the sprites I can get.
0そうだね
プレイ済み
返信[6]
親投稿
*J.P.*[P]£ aj2003aj
ok so i had seen some code that did this exactly! ill go see if i can pull it up, but it will take a while as im going somewhere right now.
0そうだね
プレイ済み
返信[7]
親投稿
Scientist Speedy1101
Okay.
0そうだね
プレイ済み
返信[8]
親投稿
PChicken NerdChicken
you're going to want to make dots, keep their position stored, and then change it every frame. so, in smilebasic terms this means we'll need an array to save, a FOR loop to change the positions of the dots, and GPSET inside of that loop to draw. X=100 DIM STARS[X,2] 'the 2 means to save two values per item (x, y) WHILE TRUE 'this is your gameloop or wherever the star movement is
2そうだね
プレイ済み
返信[9]
親投稿
PChicken NerdChicken
oh, and put this at the start of the code too: FOR I=0 TO X:STARS[I,0]=RND(400):STARS[I,1]=RND(240):NEXT back to in the gameloop: FOR I=0 TO X IF STARS[I,0] =< 0 THEN STARS[I,0] = 400 : STARS[I,1] = RND(240) GPSET STARS[I,0],STARS[I,1] DEC STARS[I,0],SPEED NEXT VSYNC 'look, ma! i'm stand-alone now! WEND
2そうだね
プレイ済み
返信[10]
親投稿
*J.P.*[P]£ aj2003aj
what PChicken said gtg save battery! bye! -sorry!
0そうだね
プレイ済み
返信[11]
親投稿
JAGMAN316 Jadwad
How do get the touchscreen too work?
0そうだね
プレイ済み
返信[12]
親投稿
*J.P.*[P]£ aj2003aj
that is very easy, you would use touch out, like TOUCH OUT TT,TX,TY making touch buttons are easy too, if you want to test around I would do something like SPSET 0,1 SPOFS 0,TX,TY (set it on the touch screen) tell me if you don't understand or need help making buttons or anything
2そうだね
プレイ済み
返信[13]
親投稿
JAGMAN316 Jadwad
Thanks! But I have a problem, I don't know how to get a sprite on the touchscreen...
0そうだね
プレイ済み
返信[14]
親投稿
*J.P.*[P]£ aj2003aj
you would use XSCREEN (i usually use XSCREEN 2) and to switch what screen your on use DISPLAY (1 or 0) remember to always switch back to the top screen after putting stuff there. tell me if this works or if you have any other questions.
2そうだね
プレイ済み
返信[15]
親投稿
JAGMAN316 Jadwad
Yo J.P it worked! Thanks a lot!
0そうだね
プレイ済み
返信[16]
親投稿
*J.P.*[P]£ aj2003aj
sure np. if you need anything else just ask
1そうだね
プレイ済み
返信[17]
親投稿
Squidy matthew3737
I need help with... Everything...
0そうだね
プレイ済み
返信[18]
親投稿
*J.P.*[P]£ aj2003aj
ok, maybe an example or something more specific will help, but ok. we will start with letters, A B C D E F G H I J K L M N O P Q R S T U V W X Y Z X there, next with typing, you press buttons of the letter you want inputted. so yeah
0そうだね
プレイ済み
返信[19]
親投稿
Squidy matthew3737
all i know is loading/editing sprites and dialog
1そうだね
プレイ済み
返信[20]
親投稿
PChicken NerdChicken
do you know what the IF statement is and does? do you know what loops are and how to use them? do you understand variables and their types? please tell me which ones you know.
1そうだね
プレイ済み
返信[21]
親投稿
oct Aidan xbomb795
.
1そうだね
プレイ済み
返信[22]
親投稿
*J.P.*[P]£ aj2003aj
yeah (and sorry about late response)
0そうだね
プレイ済み
返信[23]
親投稿
oct Aidan xbomb795
yes somebody to talk to! :')
1そうだね
プレイ済み
返信[24]
親投稿
oct Aidan xbomb795
ok how do I make it so that theres a coin on screen but when the player gets to the coin it disapperes and another coin shows up?
0そうだね
プレイ済み
返信[25]
親投稿
*J.P.*[P]£ aj2003aj
ah yes, theres a few ways, you can use SPHIDE, SPCLR (MANG NUM) you know how to do spcollision right?
0そうだね
プレイ済み
返信[26]
親投稿
oct Aidan xbomb795
um no
0そうだね
プレイ済み
返信[27]
親投稿
*J.P.*[P]£ aj2003aj
ok.. brb.
0そうだね
プレイ済み
返信[28]
親投稿
*J.P.*[P]£ aj2003aj
ok! so sprite collision is easy-ish so for every sprite you want to collide with you put SPCOL (management number) like SPCOL 0 (spcol makes it "watch" the sprite) do this for every sprite you want to collide with, lets say you want 2 sprites hitting eachother, do SPCOL 0:SPCOL 1 then you would use SPHITSP, this is for when you are making them hit, so it would be like IF SPHITSP (0,1) THEN (stuff)
0そうだね
プレイ済み
返信[29]
親投稿
oct Aidan xbomb795
? can you use a screenshot of what the code would be like because that didnt make much sense
0そうだね
プレイ済み
返信[30]
親投稿
*J.P.*[P]£ aj2003aj
sure.. in a minute im a bit busy right now, but basically for every sprite you want to collide with you put SPCOL (num)
0そうだね
プレイ済み
返信[31]
親投稿
oct Aidan xbomb795
mkay
0そうだね
プレイ済み
返信[32]
親投稿
*J.P.*[P]£ aj2003aj
there. thats how you would do it in the simplelest (ik thats not a word)
0そうだね
プレイ済み
返信[33]
親投稿
oct Aidan xbomb795
ok thanks lol but I want to pay attention to it :(
0そうだね
プレイ済み
返信[34]
親投稿
*J.P.*[P]£ aj2003aj
well don't its not correct or anything so as long as you don't do what I did lol.
0そうだね
プレイ済み
返信[35]
親投稿
oct Aidan xbomb795
also I tryed what you showed in the screenshot (not the tree stuff) and it works! thanks for the help!
0そうだね
プレイ済み
返信[36]
親投稿
*J.P.*[P]£ aj2003aj
sure np
0そうだね
プレイ済み
返信[37]
親投稿
Brandon Dash-Underscore
How do I write a program that chooses a random number?
0そうだね
プレイ済み
返信[38]
親投稿
*J.P.*[P]£ aj2003aj
sorry, was banned 4 two weeks. so if you just want it to choose a number (and print it too) do a simple ACLS A=RND(100) PRINT A the 100 is the random numbers highest.
1そうだね
プレイ済み
返信[39]
親投稿
Scientist Speedy1101
Will "? RND" work? Can't remember much. I've been very busy with other things.
1そうだね
プレイ済み
返信[40]
親投稿
*J.P.*[P]£ aj2003aj
huh.. idk.. ill have to try that! I mean if you do A=RND ? A would print RND, but just RND..? hmm.. gotta try that.
1そうだね
プレイ済み
返信[41]
親投稿
PChicken NerdChicken
No, it will not print RND. In order to print 'RND', you will need a String variable type and quotes "" around the RND. It will print 0. Why? Because RND is not RND(), it recognizes it as a variable, and variables that are not predefined default to 0.
3そうだね
プレイ済み