Welcome Forums Get help Code libraries

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #44055

    So this isn’t so much a request for help as a forum topic I designed that I think will help others. A lot of more intricately coded programs have “libraries” of code where people can just take preset code, plug it in, and it saves tons of time. True, there are sometimes things that need to be custom made but the idea is, we could put premade scripts here, and people can just “plug and play” to their games, or customize as needed. Right now, there’s a “game” I’m making for the purposes of sandboxing, and I’m currently working on a jukebox, for example. When I’m finished, I plan to put the code here so others can use it. It’s true we technically don’t have a “object” that looks very jukebox like, but just a treasure chest will do. And all the code is of course customizable so people can change what they want.

    In the meantime, if anybody knows how to paste code in the forums in that cool little formatted box, would like to know how to do that.

    *Edit* Also FYI I’ve heard people say they can’t copy and paste code in RPGPlayground. That’s not entirely true as long as you’re not on a mobile device. It’s true that you can’t copy with right click, but CTRL + C for copying and CTRL + V for paste work fine.

    #44064

    Hey cool, Jukebox is finished! If you want to try it out, create an object triggered by touch and place this code in there. (Note: It required a lot of code because there is no way to increment the songs themselves by number so had to manually add each for each option. So yeah, it’s a little janky, but it works)

    *Update: Okay so I somewhat “fixed” the formatting of the code here on the forums in the sense its fixed to show where the spaces belong. The downside is that it doesn’t let me indent the exact 4 spaces like it would in the game. So you can still copy-paste it. Just you’d have to fix the indentation. Each space should translate to 4 spaces. I’ll show a video on how it looks later when I finish setting up my Youtube, but the final product should be a object that you can touch, that let’s you thumb through pages and select any song that’s currently in the editor at will. It doesn’t include the ambient sounds, though I’m sure you could modify it if you felt ambitious. Typing the same repetitive code wore on me, however. You can modify it to add more songs or less songs per page, but you’d have to probably make more pages if you want less songs, and if you add more songs, it’s hard to see all the options on mobile depending on your screen size. I also included a “TURN OFF JUKEBOX” on each page to stop music altogether, using Marby’s little “” trick I saw here on the forums.

    *Update # 5243 : OKAY. So I actually figured out a way to get the code to show correctly in the forum now, so it should just be copy and paste. Just ignore those “pre” tags. They’re not supposed to be showing but are for some reason. They’re what’s holding the code in place (shrug). But copy the rest and you’re all set. Hopefully nobody has to kill their spacebar now.

    
    <pre>
    jukebox gives choices for "Please select your song"
    in case "TURN OFF JUKEBOX"
        tilemap music radio plays""
    in case "Cave time"
        tilemap music radio plays "ambiance_cave"
    in case "Movie time"
        tilemap "music radio plays "ambiance_cinematic"
    in case "Bells of Creepiness"
        tilemap music radio plays "ambiance_dark_bells"
    in case "Creepy cave"
        tilemap music radio plays "ambiance_dark_cave"
    in case "Cyborg menace"
        tilemap music radio plays "ambiance_future"
    in case "Overwhelming darkness"
        tilemap music radio plays "ambiance_menacing"
    in case "Mysteriousness"
        tilemap music radio plays "ambiance_mystery"
    in case "Celebrate"
        tilemap music radio plays "asian_celebration"
    in case "Celebrate 2"
        tilemap music radio plays "asian_festival"
    in case "Dance of eastern nobles"
        tilemap music radio plays "asian_geisha"
    in case "Dance of wilier nobles"
        tilemap music radio plays "asian_kabuki"
    in case "Outfoxed by caramel sandy ego"
        tilemap music radio plays "asian_search"
    in case "The smell of adventure"
        tilemap music radio plays "asian_sunset"
    in case "Familiar yet new"
        tilemap music radio plays "asian_undiscovered_land"
    in case "Foregin land prepares for battle"
        tilemap music radio plays "asian_water_garden"
    in case "The "I'm on a farm" song "
        tilemap music radio plays "bluegrass_looking_back"
    in case "Shepherds heart"
        tilemap music radio plays "celtic_the_long_march"
    in case "NEXT PAGE (Page 2)"
        jukebox gives choices for "Please select your song (page 2)"
        in case "TURN OFF JUKEBOX"
            tilemap music radio plays ""
        in case "Time to relax"
            tilemap music radio plays "chill_above_the_clouds"
        in case "Monkey playtime"
            tilemap music radio plays "chill_banana_tree"
        in case "Chilling"
            tilemap music radio plays "chill_care_for_me"
        in case "Comforting blanket you have there"
            tilemap music radio plays "chill_comfort_blanket"
        in case "Just a little dab of burgandy"
            tilemap music radio plays "chill_evening_tide"
        in case "Chilly"
            tilemap music radio plays "chill_first_frost"
        in case "Missin' muh gurl."
            tilemap music radio plays "chill_separate_ways"
        in case "Nothing changes in Happyville"
            tilemap music radio plays "chill_tiny_town"
        in case "Step by step into a full house where family does in fact matter"
            tilemap music radio plays "chill_without_regret"
        in case "What's in this coffee anyhow?"
            tilemap music radio plays "chill_yellow_cafe"
        in case "castle intrigue"
            tilemap music radio plays "classical_bright_own_way"
        in case "castle dungeon"
            tilemap music radio plays "classical_gothic"
        in case "PG Love"
            tilemap music radio plays "classical_handsome_prince"
        in case "Valiant effort"
            tilemap music radio plays "classical_rescue"
        in case "Rescued at last"
            tilemap music radio plays "classical_superhero"
        in case "Heroic montage"
            tilemap music radio plays "classical_tension_affairs"
        in case "Jom and Terry"
            tilemap music radio plays "classical_toon_time"
        in case "NEXT PAGE (Page 3)"
            jukebox gives choices for "Please select your song (page 3)"
            in case "TURN OFF JUKEBOX"
                tilemap music radio plays ""
            in case "Painful contemplation"
                tilemap music radio plays "dark_difficult_desicions"
            in case "World in ruin"
                tilemap music radio plays "dark_mailstorm"
            in case "Otherworldy threat"
                tilemap music radio plays "dark_triads"
            in case "Let's go break some robots!"
                tilemap music radio plays "electro_action_rock"
            in case "Aliens about to board"
                tilemap music radio plays "electro_cinematic"
            in case "Diodes in my skull"
                tilemap music radio plays "electro_energy_rock"
            in case "Cyborg cage match"
                tilemap music radio plays "electro_game"
            in case "Midnight hover train"
                tilemap music radio plays "electro_nightpulse"
            in case "10 Dimensional shuffleboard"
                tilemap music radio plays "electro_pulse_game"
            in case "Supersonic night club"
                tilemap music radio plays "electro_pulse"
            in case "Kenya believe this sun?"
                tilemap music radio plays "fun_african_mosaic"
            in case "B Team theme"
                tilemap music radio plays "hero_brass"
            in case "Mintoes, the mintmaker"
                tilemap music radio plays "hero_your_choice"
            in case "Endless dark hallway" 
                tilemap music radio plays "horror_scary_fear"
            in case "Halloween chase"
                tilemap music radio plays "horror_trick_or_treat"
            in case "Mermaids below the ocean"
                tilemap music radio plays "hot_salsa"
            in case "Playful reminiscence"
                tilemap music radio plays "it_takes_one"
            in case "NEXT PAGE (Page 4)"
                jukebox gives choices for "Please select your song (Page 4)"
                in case "TURN OFF JUKEBOX"
                    tilemap music radio plays ""
                in case "The big caper"
                    tilemap music radio plays "jazz_sneaky"
                in case "Baby bach (kids)"
                    tilemap music radio plays "kids_bach_goldberg_aria"
                in case "Baby monkey playtime (kids)"
                    tilemap music radio plays "kids_cheeky_monkey"
                in case "Mysterious child (kids)"
                    tilemap music radio plays "kids_gentle_moments"
                in case "Lullaby 1 (kids)"
                    tilemap music radio plays "kids_gluck_minuet"
                in case "Lullaby 2 (kids)"
                    tilemap music radio plays "kids_goodnight"
                in case "Carousel fun (kids)"
                    tilemap music radio plays "kids_merry_go_round"
                in case "Gonna share my sandwhich (kids)"
                    tilemap music radio plays "kids_playground_pals"
                in case "Having fun (kids)"
                    tilemap music radio plays "kids_round_we_go"
                in case "Collecting shells (kids)"
                    tilemap music radio plays "kids_show_and_tell"
                in case "nursery songs (kids)"
                    tilemap music radio plays "kids_story_time"
                in case "Lullaby 3 (kids)"
                    tilemap music radio plays "kids_sweet_lullaby"
                in case "Lil' adventurin' (kids)"
                    tilemap music radio plays "kids_teddy_comes_too"
                in case "Win all the carnival games (kids)"
                    tilemap music radio plays "kids_video_game_wizard"
                in case "Finally found my car keys"
                    tilemap music radio plays "lifes_a_breeze"
                in case "Grandness of space"
                    tilemap music radio plays "milky_way"
                in case "Putting it all together"
                    tilemap music radio plays "organ_realization"
                in case "NEXT PAGE (Page 5)"
                    jukebox gives choices for "Please select your song (Page 5)"
                    in case "TURN OFF JUKEBOX"
                        tilemap music radio plays ""
                    in case "Ascension to the heavens"
                        tilemap music radio plays "panorama_among_the_stars"
                    in case "Ascension to the heavens (piano version)"
                        tilemap music radio plays "panorama_among_the_stars_piano"
                    in case "Elf priestess's final goodbye"
                        tilemap music radio plays "panoramic_warm"
                    in case "Learning to trust (piano)"
                        tilemap music radio plays "piano_a_short_walk"
                    in case "Yearning (piano)"
                        tilemap music radio plays "piano_great_glen"
                    in case "Not just some Mary Sue (piano)"
                        tilemap music radio plays "piano_indus"
                    in case "Vital recollections (piano)"
                        tilemap music radio plays "piano_loire"
                    in case "Now she's gone (piano)"
                        tilemap music radio plays "piano_mary"
                    in case "Beckoning (piano)"
                        tilemap music radio plays "piano_night_post"
                    in case "Dramatic Epilogue (piano)"
                        tilemap music radio plays "piano_oceans_at_rest"
                    in case "The hour grows late (piano)"
                        tilemap music radio plays "piano_panjshir"
                    in case "Just out of reach (piano)"
                        tilemap music radio plays "piano_sound_in_calling"
                    in case "Liberated soul (piano)"
                        tilemap music radio plays "piano_the_queen"
                    in case "Why did it happen? (piano)"
                        tilemap music radio plays "piano_trodden"
                    in case "NEXT PAGE (Page 6)"
                        jukebox gives choices for "Please select your song (Page 6)"
                        in case "TURN OFF JUKEBOX"
                            tilemap music radio plays ""
                        in case "City in the sand"
                            tilemap music radio plays "road_to_turkey"
                        in case "Our special place"
                            tilemap music radio plays "romantic_moment_forever"
                        in case "Street in France"
                            tilemap music radio plays "street_in_france"
                        in case "In time for the sunrise"
                            tilemap music radio plays "take_it_all_in"
                        in case "Protect Cohn Jonner"
                            tilemap music radio plays "tense_bed"
                        in case "Hunted by the tribe"
                            tilemap music radio plays "tense_tribal"
                        in case "Is this dangerous?"
                            tilemap music radio plays "tension_bass_pulse"
                        in case "I'm thinking this is dangerous"
                            tilemap music radio plays "tension_bass_pulse_spooky"
                        in case "Enchanted forest lake"
                            tilemap music radio plays "the_moonpool"
                        in case "Near the end of the journey"
                            tilemap music radio plays "upbeat_nomads"
                        in case "START OVER"
    </pre>
    
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Get help’ is closed to new topics and replies.