@Leviceljir one = is fr assigning a value. Two = (==) is for comparing.
IF APPLE==1 THEN @EAT
If Facebook, Myspace, Twitter, Instagram, and Snapchat were all destroyed, 90% of teens would go insane. If you're one of the 10% that would be laughing at them, copy & paste this into your signature and hope it happens.
Too much drama and competition needlessly. Let's all get together and have fun and make good games together and have fun! that's what programming is meant to be! (Er unless you're in the game industry) I don't really have a place to say this but this constant trying to 1-up eachother is annoying. But atleast now I know what you're all experienced in.
Got a project? PM ME on here!
Youtube: lostkitty64x
Want help with coding? PM ME! PM ME PM ME!! XD
FC: WIll post later.
Systems I own: ds lite, 3DS, PC/gaming, steam platform. I play alot of games. Just ask ! Minecraft anyone? :D
Too much drama and competition needlessly. Let's all get together and have fun and make good games together and have fun! that's what programming is meant to be! (Er unless you're in the game industry) I don't really have a place to say this but this constant trying to 1-up eachother is annoying. But atleast now I know what you're all experienced in.
I agree
Just your average talking boot. FC: 0791-4881-1672 for Smash and Pokemon.
Hey guys (and i'm looking at you, @TAINT_Zzyex, @0Games) — our community rules not only ask that users here speak English, but also that users here not insult or flame one another. The next time i get a report in my inbox where someone is calling the other person horrible things in Portuguese or any other language, up to and including English, they will be banned, end of story. There has been far too much drama in here lately with the off-topic crap, and to have this starting up after we'd finally gotten that taken care of absolutely blows my mind. Please start being respectful toward one another.
BEST THREAD EVER future of NL >:3
[16:43] James: I should learn these site rules more clearly
[16:44] LztheBlehBird: James doesn't know the rules? For shame!!!
@LOOP
SPREAD(CUR), X, Y
SPREAD(1),WX,WY
IF MAINCNTL%90==0 THEN GOSUB @WITCH
IF SPHIT(0,1) GOTO @END
IF SPHIT(2,1) GOTO @END
IF SPHIT(3,1) GOTO @END
IF BUTTON() AND 1 THEN GOSUB @UP
IF BUTTON() AND 2 THEN GOSUB @DOWN
IF BUTTON() AND 4 THEN GOSUB @LEFT
IF BUTTON() AND 8 THEN GOSUB @RIGHT
IF BUTTON()==0 THEN SPANIM 0,1,0 : AN = TRUE
IF BUTTON()==0 THEN SPANIM 2,1,0
IF BUTTON()==0 THEN SPANIM 3,1,0
IF BUTTON() AND 16 THEN CUR=(CUR+1)%3
IF CUR>0 THEN CUR=CUR+1
GOTO @LOOP
@UP
SPCHR CUR,76
IF AN THEN SPANIM CUR,4,20 : AN = FALSE
SPOFS CUR,X,Y-2,2
RETURN
@DOWN
SPCHR CUR,68
IF AN THEN SPANIM CUR,4,20 : AN = FALSE
SPOFS CUR,X,Y+2,2
RETURN
@LEFT
SPCHR CUR,72
IF AN THEN SPANIM CUR,4,20 : AN = FALSE
SPOFS CUR,X-2,Y,2
RETURN
@RIGHT
SPCHR CUR,64
IF AN THEN SPANIM CUR,4,20 : AN = FALSE
SPOFS CUR,X+2,Y,2
RETURN
(snipped, the witch stuff doesn't touch CUR)
Does anyone know how CUR can get set to 4?
Please? Anybody?
EDIT
Also, might I suggest that if a PRG file is meant to be APPENDed and used as a library its name should start with an underscore _?
And have all their routines prefixed with their name?
Example: I am making Petit Window Manager (PRG:_PWM) which is a simplistic graphical manager for PTC. When you start it you GOSUB @PWM_INIT.
ANOTHER EDIT
And is it possible to put text on the screen with graphical coordinates?
Too much drama and competition needlessly. Let's all get together and have fun and make good games together and have fun!
Your needless positive talk is simply incorrect if you match it with me. I joined both Nintendo Life and GameFAQs to gain experience now, and as a result later I will have an exceeding skill. Yes, I'm one of the younger ages in here. If you try to guess my age I'll report your posts that attempt to find out.
(What TAINT said was pure offense. Mine was a saying, I don't know why it's a swear because it means nothing.)
I agree with TBD. It seems you three (And some others) have been off-topic for the last weeks.
REMEMBER, THIS THREAD IS ABOUT PETIT COMPUTER. YOUR BEHAVIOR SHOULD BE RATHER EMBARRASING. PLEASE STOP IT RIGHT NOW. I'm sorry for using Caps. I said this twice already and was ignored... ...twice. Whats it take to just stop offending one another and staying on topic guys? This thread is on Petit Computer in case you didn't notice.
CUR only changes in a couple places: let's look at just those lines to see what happens.
IF BUTTON() AND 16 THEN CUR=(CUR+1)%3
IF CUR>0 THEN CUR=CUR+1
This happens every time your loop runs, and they key is how you have two different IF conditions for changing the value.
The first statement will use modulus to make sure that CUR is always in the range {0, 1, 2}... but that code is only run if the currently pressed button matches your AND 16 condition.
The second statement will increment CUR any time that the value is greater than 0. It doesn't care if any buttons are held down
So let's assume that the first time you run the loop, CUR is 0. As long as you don't press buttons, it will remain 0. Once your button condition matches, it will change to a value of either 0, 1, or 2 depending on how many times the loop runs. But if the number is ever greater than 0 (which it can be) while no buttons are being pressed, then CUR will just increase by 1 to any number (4 or higher).
@Malltog to set text using graphical coords, use GPUTCHR.
If Facebook, Myspace, Twitter, Instagram, and Snapchat were all destroyed, 90% of teens would go insane. If you're one of the 10% that would be laughing at them, copy & paste this into your signature and hope it happens.
@ejamer Aha, thank you.
I'd change that to IF CUR>0 AND CUR<4 THEN CUR=CUR+1. @IAmAPerson I tried that, and it just said Invalid function call. Could you give an example?
Google translate... and omg...
Heres the translated features of petit computer 3DS including also ten times faster execution time:
Editable 999999 line
Support for extended slide pad
Color coding of the word can
Can be folded area of the program
Editing of multiple sources (up to four) can
Standard feature of a painting feature
(Such as UNDO function and multi-line copy) strengthening of editing functions
Input device support microphone, camera, sensors, etc.
Server management of user work
Link DETUNE application with (music software)
not to mention it looks like we'll get to use the stereoscopic screen (layers!) I'm not sure how many layers.. but this seems PROMISING with REAL 3DS features.
Got a project? PM ME on here!
Youtube: lostkitty64x
Want help with coding? PM ME! PM ME PM ME!! XD
FC: WIll post later.
Systems I own: ds lite, 3DS, PC/gaming, steam platform. I play alot of games. Just ask ! Minecraft anyone? :D
i have a glich in ultima heres the code.
if a$=='t' then goto @talk @talk
if button()==1 then goto @talkn
etc
etc
etc @talkn
print'talk-north goto @nxtalk @talks
print'talk-south
goto @nxtalk
etc
etc @nxtalk
this displays-
talk-north
talk-south
talk-east
talk-west
hello...
wut
GPUTCHR x coord,y coord,"type",number,palette number,scale
X and Y coords are as you'd guess. Type means the kind of CHR. Text is BGF. Palette number is, well, the colour palette number. Scale is how big the text is. 1 is normal. Number is the ID of a character. Use
ASC("character")
To get the ID, or use a FOR loop with MID$. I'm gonna print text using white text at normal scale.
TEXT$="Hello, World"
FOR I=0 TO LEN(TEXT$)-1
GPUTCHR I+10,0,"BGF",ASC(MID$(TEXT$,I,1)),0,1
NEXT
ASC gets the numerical value of a character. LEN gets the length of a string.
If Facebook, Myspace, Twitter, Instagram, and Snapchat were all destroyed, 90% of teens would go insane. If you're one of the 10% that would be laughing at them, copy & paste this into your signature and hope it happens.
Google translate... and omg...
Heres the translated features of petit computer 3DS including also ten times faster execution time:
Editable 999999 line
Support for extended slide pad
Color coding of the word can
Can be folded area of the program
Editing of multiple sources (up to four) can
Standard feature of a painting feature
(Such as UNDO function and multi-line copy) strengthening of editing functions
Input device support microphone, camera, sensors, etc.
Server management of user work
Link DETUNE application with (music software)
not to mention it looks like we'll get to use the stereoscopic screen (layers!) I'm not sure how many layers.. but this seems PROMISING with REAL 3DS features.
This is 10 times more hype worthy of either Grand theft auto 5 or Call of duty. What do they mean by server management though? Could this mean Local or Online multiplayer with custom set up servers? Hopefully it could be ALOT more 3D friendly. Imagine what we could do with Minecraft 3DS or a similar raycasting engine
@TAINT_Zzyex You're going to have to forgo editing your code like using "etc", because giving us snippets doesn't give us the entire picture. The problem can very well be in a section you edited out.
Discostew
3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew
Ok, I give up, people. How do I program some shooting with a bullet? My memorization of how to do that totally slipped and I can't remember how anymore. Zombie AI can wait for now, help me.
Ok, I give up, people. How do I program some shooting with a bullet? My memorization of how to do that totally slipped and I can't remember how anymore. Zombie AI can wait for now, help me.
Forums
Topic: Petit Computer
Posts 7,201 to 7,220 of 9,620
Please login or sign up to reply to this topic