Hey guys Im new to this website, not petit computer.Ive seen some of your games and wow,there amazing guys. Im working on a couple projects my self. Heres the three im working on.
OverworlDS- Its a game like Terraria, but its my own sandbox game. Its 2d. It has randomly generated worlds and a few crafting recipes, but thats it.
Soul-A first person shooter. 1 level done.
Hunt-My best and most completed game yet. Your a medevil(sorry for spelling) hunter and theres different towns and i have 1 boss done. Im adding classes and stuff, and so far its on good progression! But i wont post a demo yet, because of it being low on features.
Ok thats it but I have a favor to ask someone- Can you post a link to Morphtroids(or Morphtorok, whatever his name is.) Petit pet craft? Thanks and this is my first post. Also what does watch topic do?
EDIT:Im programming on a dsi so I dont have a friend code.
Hey guys Im new to this website, not petit computer.Ive seen some of your games and wow,there amazing guys. Im working on a couple projects my self. Heres the three im working on.
OverworlDS- Its a game like Terraria, but its my own sandbox game. Its 2d. It has randomly generated worlds and a few crafting recipes, but thats it.
Soul-A first person shooter. 1 level done.
Hunt-My best and most completed game yet. Your a medevil(sorry for spelling) hunter and theres different towns and i have 1 boss done. Im adding classes and stuff, and so far its on good progression! But i wont post a demo yet, because of it being low on features.
Ok thats it but I have a favor to ask someone- Can you post a link to Morphtroids(or Morphtorok, whatever his name is.) Petit pet craft? Thanks and this is my first post. Also what does watch topic do?
EDIT:Im programming on a dsi so I dont have a friend code.
Each of them sound awesome!!!!
Thanks! umm this may not be in the right spot
"Lets fight fire with fire!" "won't that just burn the house down?"
Hey guys! If you know me from the qr sharing thread then you can skip past this. I programmed in VB (Visual Basic) when I was younger, but dropped it. Recently, I found petit computer and decided to give it a shot. I've been doing pretty good, but I still have yet to learn a lot of things, so please expect a lot of questions.
Anyway, first off, I was wondering how to look for "keywords" in an input. For example, in minecraft bukkit, if you say: I like &4potatoes.
the &4 will make the word "potatoes" red. I know, because of that, it's possible in JavaScript. But can I do it in petit? Please help
Yes it can, but it require a bit more to do. Text color is based on what COLOR is set to, so you would have to do something like this...
PRINT "I like ";
COLOR 13
PRINT "potatoes."
COLOR 0
It prints the first part, changes to Red (which is index 13), prints the next part in red, then sets back to white.
To do this on one line and using ? instead (which is the same as PRINT)...
?"I like";:COLOR 13:?"potatoes.":COLOR 0
Thanks! But how do I do it according to keywords in the 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.
Hey guys! If you know me from the qr sharing thread then you can skip past this. I programmed in VB (Visual Basic) when I was younger, but dropped it. Recently, I found petit computer and decided to give it a shot. I've been doing pretty good, but I still have yet to learn a lot of things, so please expect a lot of questions.
Anyway, first off, I was wondering how to look for "keywords" in an input. For example, in minecraft bukkit, if you say: I like &4potatoes.
the &4 will make the word "potatoes" red. I know, because of that, it's possible in JavaScript. But can I do it in petit? Please help
Yes it can, but it require a bit more to do. Text color is based on what COLOR is set to, so you would have to do something like this...
PRINT "I like ";
COLOR 13
PRINT "potatoes."
COLOR 0
It prints the first part, changes to Red (which is index 13), prints the next part in red, then sets back to white.
To do this on one line and using ? instead (which is the same as PRINT)...
?"I like";:COLOR 13:?"potatoes.":COLOR 0
Thanks! But how do I do it according to keywords in the string?
You can't, not without processing the string yourself by examining each individual character in them to check for those keywords, which you would have to implement yourself, both the process and how to deal with keywords. The example you showed is something built-in to that programming environment and done automatically. That is something not built into PTC.
Discostew
3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew
Hey guys! If you know me from the qr sharing thread then you can skip past this. I programmed in VB (Visual Basic) when I was younger, but dropped it. Recently, I found petit computer and decided to give it a shot. I've been doing pretty good, but I still have yet to learn a lot of things, so please expect a lot of questions.
Anyway, first off, I was wondering how to look for "keywords" in an input. For example, in minecraft bukkit, if you say: I like &4potatoes.
the &4 will make the word "potatoes" red. I know, because of that, it's possible in JavaScript. But can I do it in petit? Please help
Yes it can, but it require a bit more to do. Text color is based on what COLOR is set to, so you would have to do something like this...
PRINT "I like ";
COLOR 13
PRINT "potatoes."
COLOR 0
It prints the first part, changes to Red (which is index 13), prints the next part in red, then sets back to white.
To do this on one line and using ? instead (which is the same as PRINT)...
?"I like";:COLOR 13:?"potatoes.":COLOR 0
Thanks! But how do I do it according to keywords in the string?
You can't, not without processing the string yourself by examining each individual character in them to check for those keywords, which you would have to implement yourself, both the process and how to deal with keywords. The example you showed is something built-in to that programming environment and done automatically. That is something not built into PTC.
I would consider doing that, but that would be way to complex. Thanks for telling me! Saved me days of google searching.
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.
Thanks
I plan on putting it into seperate chapter releases, each with the next part for everyone.
The first release will have the prologue and chapter 1, with 3 endings if i remember correctly. Each ending will continue onto separate stories in chapter 2 when i keep it up. Ive never done this before and its a lot of work but fun. Been recently working on custom music and such, though i might take some samples from other sources... I really like the King of Thorn theme, i wanna make it.
WIP:
Natura Deity - Chapter 1 - A choose your own adventure game with more emphasis on story than just the random events occuring
Probably something people knew already, but I just found out that SWAP isn't just limited to individual variables, but can also be used for array elements. Not just that, but you can swap between an array element and a normal variable, like...
DIM AB(20)
AB(1)=30
BA=40
SWAP AB(1),BA
? AB(1);",";BA
prints "40,30"
Discostew
3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew
edit: nvm think i figured out how, also found out you can store a number into a variable and change song based off of number in the variable
so bgmplay 1
song = 128
wait 60
bgmplay song
it definitely works, though you need a song for 128, if this helps anyone i'm glad to be of service
edit edit: also found out one way to loop my music in the background without having to manually recheck.
I just added a bgmchk to the loop that waits for you to push a to get to the next bit of text.
so now if i wanna change song out of nowhere, i can just do:
x = 1
bgmplay x @pusha
if button = 0 then goto @next
wait 1
goto @pusha @next
if button = 16 then goto @nexta
if bgmchk = 0 then bgmplay x
wait 1
etc
logically, i see no errors! this allows me to change songs at will with 2 lines of code, as well as repeat easily since i have no idea how to do it otherwise, all while being able to help those who might be curious
From what I understand, the pre-set music already loops by itself. Some of the "jingles" don't though, but those weren't meant to be looped. If you're talking about self-made music looping, then take note that you can add looping within the music you make, using "[" where you want the loop to begin and "]" where you want the loop to end and repeat within the strings. The ending of the loop via "]" can be set with a number right after to determine how many times to loop, like "]2" means loop twice. Leaving it blank or setting it to 0 means loop forever. The number is also part of the list of items that can be changed using BGMSETV.
Discostew
3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew
The DIM command in PTC is a LOT different than Visual Basic (my first programming language). In VB, it's used like this: INPUT ABC DIM ABC AS STRING
DIM in VB is used to define the type of input. So instead of ABC or ABC$ in PTC, in VB, you "DIM" as either a string, variable, or boolien (a true/false statement).
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.
I kinda stopped programming in VB because it was too structured. I just couldn't do it. I find PTC to be a lot easier to learn and use. It would've taken me years to learn in VB what I've learned in a couple of weeks in PTC.
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.
Just wondering, how hard would it be to replicate this song in PTC using the DATA command?
If its not too hard, would anyone be willing to do it? It would be AWESOME if you could do it. If it is virtually impossible, don't worry about it. I've provided a youtube link to this song being run by synthesia so you can see exactly what's going on. Thanks!
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.
Umm...about my hunt game,Its messed up right now, so the release of the demo will be delayed until i can fix the promblem. So yeah. Anyways if you have any ideas for it please tell me. What its about is in my previos posts. The promblem is in the start menu and with the sphit commands. It mixes up the sphit commands and you cant unpause the game. It was working fine and now its just Oh and you can get married now and save. You can ask your wife to follow you too.
@IAmAPerson620
Try this to change color base on & and a number 0-9. Just feed it your text string.
I am amazed! I couldn't understand a lot of it with the MID$, but I did change a little to adapt it to my needs. I am dumbfounded that you can do this! FC in signature
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.
Forums
Topic: Petit Computer
Posts 3,161 to 3,180 of 9,620
Please login or sign up to reply to this topic