VS 2008 - Building A Game - (text Based) "if Main.currentpowerget.text <= "7" Then ...."

Aug 5, 2009

Im having a hard time getting this to work. Im building a game in .net vb (text based) and where it says "if main.currentpowerget.text <= "7" then ...." when that textbox is between the numbers 1-9 it works but as soon as it hits the number 10 it stops working and shows the msgbox that says you ran out of power.

Private Sub robbank_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles robbank.Click
If Main.currentlevel.Text >= "3" Then

[CODE]..............

Here is another code from the same game im making just another event that works just fine when the text box is above and below 10

Private Sub attackaboy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles attackaboy.Click

[CODE].......................

View 2 Replies


ADVERTISEMENT

Tutorial For Making A Text Based Game In VB?

Mar 25, 2010

is there a tutorial for making a Text Based Game In Visual Basic?

View 2 Replies

VS 2010 - Make A Simple Text Based Rpg Game?

Nov 9, 2011

[code]...

Yup,not PHP but it's the same for readability)As you may imagine I want to make a simple text based rpg game, but that's not an important fact.The buttons btn1 to btn3 are already created at the designer, and there are going to be other procedures which will assign values to their text property according to the game context (main menu, combat, shopping, training, etc.) you're at.Ok, so what I want to do with that procedure I pasted is to parse the text of ANY of those buttons when I click them, and according to its value select a case which will trigger another appropriate procedure (now there are only msgboxes as placeholders for testing only).My problem is that I dont know how to refer to the originating class of the handled event! I mean, let's say I click btn2. I'll want to immediately get the text property of that button only and use it as the value for the select case tree. I suppose I need to put something at that ?I wrote there, but I don't have any idea. The first time I was so naive to put me.text in there, and of course it returned the form name. Is there's something to do this thing...? I thought at first it would be a very simple task, but I'm going nuts searching for a solution so it's like if it was not possible, but I find hard to believe that, because this would be very useful, right? By the way, what I want to achieve is not needing to make a separate procedure for each button and to avoid as well the need to move any game option to another procedure if later on I want to rearrange the menus, because I expect the game to have more than three buttons actually.

View 2 Replies

Forms :: Beginner Text Based Game Location Handling?

Mar 18, 2009

I am just for learning purposes trying to develop a one player text based game.

I have a rich text box (GameWindow)
I have a text box (InputWindow)
I have a button (InputButton)
and a bunch of labels that aren't really important

I have two questions first is easy probably. How do i get InputWindow to respond to me hitting enter when text is in it?

[Code]...

But if i plan to have more that is only going to increase the size and code needed and im sure there is an easier way i just don't know how to do it.

View 1 Replies

Want To Make Text Based RPG Game Will 'upgrade' As Programming Knowledge Grows

Dec 12, 2011

Well this is a re-post now as nobody replied in the gaming section, and i believe this question could go as a normal VB question, therefore I'm asking in this category instead.I have decided to pick up on programming and want to make a text based RPG Game i will "upgrade" as my programming knowledge grows.I got some ideas that i think i should use, but i want you guys' opinions on it.I assume I'll use different classes for each monster, which will have properties.Should those monsters then be inside a list of all possible monsters, or would i have a monster class which i would use and generate the enemies when needed? And would i use the same approach on items and character stats?

View 4 Replies

Game Development - Write Text In A Already Existing Text File?

Apr 7, 2012

I've been developing a arcade game, and as every good arcade game, it has an incorporated scoreboard so that players can see who scored better. My problem is that everytime it enters a new scoreline, it deletes all the previous lines in the text file. The code I've been using is the following:

If player1 > 25 Then
objReader.Close()
MsgBox("O " + jogador1 + " ganhou.")[code]............

View 2 Replies

Game Programming :: Prevent Users Typing In Random Letters In A Text Box-Scrabble Game?

May 4, 2011

I have created a scrabble game that generates random letters. For the user to type in a word using the random letters they have to type it in a text box.

I want my program to prevent users from typing in letters that are not provided in the text box and to allow them to type in the random letters that are provided.

View 4 Replies

VS 2008 - Fetching From A Text Based Database

May 8, 2009

i have a database file in .txt its a regional dictionary file released under GPL. [Code] How do u i fetch a word from it? Like if any one type abbey in a textbox, the first word in this sample, it should return the meanings numbered 1,2 & 3. How can it be done? can any one give me a sample code? Its for making a free software.

View 2 Replies

VS 2008 Way To Retrieve Text Value From A Listbox Based On Index

Sep 7, 2010

is there a way to retrieve text value from a listbox based on index ?like if i enter index 0 and want to retrieve it's text value from the listbox

View 5 Replies

VS 2008 Filter The BindingSource Based On Text Matches Between Any Of The Fields In The Child Table

Jul 16, 2011

I have a database with a table that is a child to many other tables. I am using this child table as a datasource for a datagridview. I am using comboboxes to display specific fields in any parent tables, instead of the user seeing the foreign key. Everything is fine. However, I would like to filter the BindingSource based on text matches between any of the fields in the child table and the corresponding fields of the parent tables.

[Code]...

View 5 Replies

Building An Email From Text Fields In A Form

Nov 30, 2010

I need to build a rather simple form for collection some information from our membership. It has 4 Text boxes and one Submit button. The contents of the text boxes need to be emailed to a fixed Address and a fixed Subject. Before I got to fancy I tested the form to see if the email portion worked which I did get the email but not all the data. I am trying to stick with VB as I had experience with it years ago.

My problem seems to be in building the string for the body of the message. Trying to use StringBuilder but my syntax is messed up somewhere. The Fields that I have are: Name, Phone, Email Address: and Comments. They are named in the form as txtName, txtPhone, txtEmail and txtComments. [Code]

View 5 Replies

Take A Comma Delimited Text File And Then Select All Unique Records Based On One Of The Fields In The Text File?

May 7, 2010

i want to take a comma delimited text file and then select all unique records based on one of the fields in the text file. should i read the text file into a data table or just use a data reader?

View 7 Replies

Building A Jukebox And It Consist Of Listboxes And Text Boxes?

Apr 14, 2011

I am building a jukebox and it consist of listboxes and text boxes. I have got it so that when the user doubleclicks on a song from the first listbox it moves into the next one. Problem is, when it gets there it should check if there is song waiting to play in the text box and if not move into the text box play position. also it has a timer function to run in between the tracks playing. I have tried deleting and re writing bits of my code but am getting a bit messed up with it now.

[Code]...

View 11 Replies

VS 2008 : LblTotal.Text = Val(Form2.label.Text) + Val(Form3.label2.Text) Not Working?

Feb 25, 2010

I am creating a Pizza Order program as part of my coursework college. why something isn't working.

Quote:

lblTotal.Text = Val(Form2.lblPizzaTotal.Text) + Val(Form3.lblDrinksTotal.Text)

The code above is what I am using to add the Value of Label 1 (Pizza Total) and Label 2 (Drinks Total), however it seems that in the final total it doesn't appear to add the value of Label 2.

View 8 Replies

Build A Pacman Game - Building The AI For The Ghosts?

Jun 21, 2010

I am trying to build a pacman game. Currently I am in the process of building the AI for the ghosts. The way I have the AI working is whenever a ghost enters an intersection, it will check where the player is relative to its position,then it will move in one of the possible directions depending on the intersection it is at.The problem I am experiencing though is whenever ghost is moving horizontally it cannot be sent to the left. Similarly,when it is moving vertically, it cannot be sent up or down.This doesn't allow it to turn around when it is moving to the right or to the bottom. It can be sent right when moving left though. When searching through my code I cannot see why this is.

View 1 Replies

VS 2005 Building XML Based Upon Xml Schema?

Sep 2, 2009

A similar question has been asked before but noone seems to have an answer.I have an xsd which is fairly complex in nature.I must now create the xml file to be validated against it but I hate trying to interpret xsd. It's all gobbldygook to me.

Is there any way I can take an xsd file and create on the fly an example of what the xml file should look like?

View 1 Replies

Building FlatComboBox Component Based On The DateTimePicker?

Mar 23, 2011

I am building this FlatComboBox component based on the following DateTimePicker http:[url].....The only issue that I am facing is that the component does not "leave" when I type Enter or Tab.

Imports System
Imports System.Windows.Forms
Imports System.Drawing[code]......

View 2 Replies

Display Application Name In The Text Property Of Main Form?

Feb 25, 2012

I am wanting to display my Application name in the text property of my main form. This is the code I a using:
Me.text = My.Application.Info.Title & " " & My.Application.Info.Version.ToString I am wanting to change the name of my project from when I first created it and for this new name to be displayed via the above code.

I have changed the name under the properties setting, yet it is not updating.

View 2 Replies

Returns The Value Of The Text Fields Back To The Main Routine?

Feb 6, 2010

How can I implement a sub routine or function that does a test for number validation in text fields and then also returns the value of the text fields (if they were valid) back to the main routine?

View 4 Replies

VS 2008 - Read Text File - When Click Button Add Text From Combobox Is Added To Text File

Jan 4, 2010

I have one combobox, two buttons (Add and View) and listbox. When I click button Add text from combobox is added to text file. This is code for Add button:

[Code]...

View 7 Replies

Play A Mp3 On Main Menu For Game?

Apr 28, 2011

Im trying to play a mp3 on my main menu for my game however its not playing... ive tried hardcoding the file to the desktop, inserting the file into the solurtion explorer and even declaring it its own sub?I just want the file to play when the form loads up?

View 14 Replies

Use A Delegate To Update Text Of Main Form From DoWork Event Of BackgoundWorker?

Mar 26, 2010

How would you create and use a delegate to update the text of the main form from the DoWork event of a backgoundWorker?

View 4 Replies

Game Programming :: Searching For A Name (text)?

Nov 27, 2010

I know this is my first post and Im very sorry its a question right away. I apologize for this, but I felt that I have to ask, I was searching all over and couldnt find answer, probably I just need help to define the keywords..searching for a name of a monster in some game and move the mouse onto it. Example: In middle of the screen, there is monster named: AAA I would need the program to search for the name "AAA" and move the mouse onto it.

View 2 Replies

Online VB Game With Text And Connections?

Sep 20, 2009

Here is the plan/layout for the connection to a database.The biggest thing is that, it must be able to be connected by everyone, and it's pretty obvious why this is a big one, haha. The aim of the database is, naturally, to store all the info about the user required by the game (so each column would have x rows, name, age, etc etc). The program would have the ability to add columns (user registration) and log into them (username and password). They would enter their username password, and it would search for username, and if found, confirm password = password in that column.

So basically, the database acts like any other database, it just needs to be able to be connected by everyone (or by a vast majority of the average population), and be able to be edited (adding rows/deleting rows).I've dealt with databases before, but only local ones, and I've tried before with internet (and intranet a few times), but those ones never went anywhere, so they were dropped.

View 4 Replies

Create A Multiplayer Game - Send Some Text

Jan 9, 2011

I'm trying to create a multiplayer game, but i don't know how to communicate between my programs, what I'm trying to send is some text, which my program can understand it. I searched for it and for making a chat application but found no working results...

View 10 Replies

Save Yahtzee Game To A Text File?

Oct 12, 2010

I have created a Yahtzee game, its all complete appart from the high score sheet.

I have added a text file to the project, but I have absolutly no idea how to take the score from the grand total label and print it to the text file at the end of the game.

[code]...

View 1 Replies

.net - Set The Value Of A Textbox Based On The Value Of A 2nd Text Box?

Aug 20, 2010

I have a textbox which can be left blank or contain a date. If the textbox has a date I want the 2nd textbox's value to be set to the value of a session variable. I need this to happen before the update sql is performed on postback.

[Code]...

View 1 Replies

SelectedIndex Based On Text Box?

Sep 11, 2010

I have a list box with over 50 words. I would like the user to be able to type the first few letters of the word in a text box, and the program would automatically set the SelectedIndex property to that word in the box.

View 2 Replies

Game Programming :: When Accessing Form2, Text Is Selected?

Jul 23, 2008

I am creating a game with VB2005. On Form2 I have placed a textbox containing the Rules for the Game. When I click on Rules from the Menu in Form1, Form2 opens and displays the information, but the text is selected (highlighted blue) what have I done?

View 6 Replies

Making A Game That Reads Text Files Off Of An Ftp Server?

Jul 1, 2010

im makign a game that reads text files off of an ftp server. everything is working great. except for the fact that i cant read more then the first line of the players text file. how would i use substring to, for example, look for 'inventory' and get all the info under 'inventory' and above the next title?

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved