Pokemon yellow text adventure!

Hellfire

Pokedex Completed
842
2012
275
Awards
1
Credits
2,906
so i just started learning programming at school, and i am starting with visual basics console apps.
i am in the process of making a text version of pokemon yellow, but i need a bit of help.
Problem 1: i need a way to make it access a list of variables that is separate from the regular list and is only used when the command
"RED'S PC" is used.
Problem 2: is it possible to use a background RNG?
Problem 3: how can i upload it to this thread?
 
How are you storing your variables? Does VB support arrays?

No idea.

Find a file sharing site like Rapidshare or whatever and then post the link here.
 
How are you storing your variables? Does VB support arrays?

No idea.

Find a file sharing site like Rapidshare or whatever and then post the link here.

VB should support arrays, I've used them in Excel Macros I think. If it couldn't, I would be shocked. They aee like, a programming staple.

Also no idea about the RNG.

And what Zexis said.
 
could you help me out with the code? i have had like a hour and a half of learning VB so far
tongue.gif

so i have no idea how to do arrays, the rng will be used for random encounters (i THINK i can make it do a background roll that wont show up....) and as for rapidshare, ill give it a go.
course, i only want to upload it so whoever is interested can have a general idea of what will happen (for everything fro the intro with oak to examining the snes in the player's room as the first action)
 
Oh a randomly generated background? Well one way is making an array of all backgrounds, generating a random number between 0 and the number of backgrounds, then using that number yo pick a background.

I'll get a mini-demo up later (on meh phonesies)
 
Not sure if this is right, haven't even tested it, but I'm guessing it'll go like this:

Code:
' Create an array that holds 3 values
Dim backgrounds As String(3)

' Populate all 3 slots of the array with a different background id
backgrounds(0) = "grass"
backgrounds(1) = "desert"
backgounds(2) = "forest"

' Initialize the random-number generator.
Randomize()

' Generate random value between 0 and 2
' backgrounds.Length refers to the length of the array created above
' Rnd() is the random number function
Dim value As Integer = CInt(Int((backgrounds.Length * Rnd())))

' Now you have a random number, get the value and put it in a variable
Dim rndBackground As String
rndBackground = backgrounds(value)

' Now do whatever you want with rndBackground
' backgrounds could be filled with background image file names or something, so you load in a random background.
' Randomly selecting specific backgrounds would get a bit trickier of course
' I don't know if I wrote it properly, but feel free to change anything that looks bad practice to you because I am in no way good at VB
 
Last edited by a moderator:
Back
Top