Questions tagged [text-based]
233 questions
-1
votes
2 answers
why is my list getting an error?
I have my program ask what attack you want and it supposed to get the spells from a list who gets the attacks from def's and I'm getting this error
player_spells = {fire_spells, ice_spells, water_spells, chaos_spells, nature_spells,…

Innlion
- 11
- 7
-1
votes
1 answer
How to move agent into a space
I'm stuck at a part of my homework. Im not sure how transport the agent to another space.
Add a method usePortal to the Agent class that has no parameters and a void return type.
This method gets the agent's location's portal, and checks to see if…

Tom Pontikes
- 11
- 2
-1
votes
2 answers
Click on button to open a new form?
I'm trying to create a text-based game where the user selects buttons and that will lead to other parts of the game, right now I need the program to close the old Form and the new form must be placed in where the old one was.

Joshua
- 17
- 1
- 1
- 5
-1
votes
1 answer
HTML buttons showing text without interrupting the script
Ok so I'm kind of new in HTML/javascript, but I'm working on a project, which is a text-based game, basically, I want to have a function, which takes an array of text, print the first one in a text zone, and wait until the "ok" button in pressed…

Guhogu
- 81
- 1
- 3
-2
votes
0 answers
python assignment simple text-base game
I am supposed to write a program for a simple text-based game. You have to move from one room to the next. The map starts in the Observation room and you can go south to the Rec room or exit the game. From the Rec room you can go north back to the…
-2
votes
1 answer
How to send messages to multiple users via bot to individually irrespective of others in discord.py?
So, I'm making a text based game and I want that whenever a user types a command my bit DMS the user and starts the story for that user. I'm not sure how to do this for multiple users. Like if a game has already been initiated and someone else wants…
-2
votes
3 answers
Dictionary for rooms and items Problem, Python text-based game
I have done most of the work but currently having problems with my dictionary linking rooms and then the items within together. Line 21 (which begins with 'Main Fair ground': {'South':) is too long and invalid. Below is the code I have done so far,…

Ms.Python_newbie
- 11
- 1
- 5
-2
votes
1 answer
Method keep adding the same thing to the list
I 'm creating a Text Base arena rpg where each day new monsters are add to the list, but only one monster get add to the list repeatly with the same stats which for some reason keeps increasing each day.
What i need are that diferent objects with…

galbe-droid
- 9
- 5
-2
votes
2 answers
Java Loop until all of the methods are met
I am doing a simple text based OOP java game.
I am a bit stuck at the moment and hoping for a help
Here is the code
while(true){
if(question==1){
String input1 = inputString("You have entered the Dungeon, here you find a " +…

Demiah
- 41
- 8
-2
votes
2 answers
C# text based game - Returning after wrong option
I'm writing a C# text based game to learn how to code.
I don't know how to explain this, but I wan't my game to be able to recognize if you input a wrong parameter and asks you the question given to you again.
E.g
Code Question: Do you wan't to…

Jorge Gill
- 175
- 1
- 2
- 10
-2
votes
1 answer
C# CS0136/CS0165 Errors Text-Based RPG
I'm currently making a test text-based RPG, I'm currently on the currency system and I am receiving an error. I'm not sure why.
for (int gold; gold <= 10; gold++){
if (gold == 10) {
break;
Console.WriteLine("You now have " + gold + " Gold Pieces");…

Anthony P
- 31
- 2
- 9
-2
votes
3 answers
Turn-Based Text-Fighter: Indent Error
I am a Python newb.
I keep getting indent errors around the if statements of my code.
The first chunk of if/else statements are read fine.
The second chunk results in indent errors.
When I remove it for debugging.
The third chunk (at the end) also…

Dmitri Valentine
- 19
- 4
-2
votes
1 answer
changing variables in one function from another function
I'm working on a text based adventure game in python. Nothing super fancy. I want to have a lever in 2 different rooms unlock a gate in a third room. Both levers need to be pulled in order for the gate to be unlocked.
here are the two rooms with the…

Ranger Skip
- 105
- 8
-2
votes
1 answer
Java: Selecting object in text based game
I've been working on a text based game for class and have been able to get most of it working with a little trial and error. But I've run into a roadblock with the user input parsing, which I've already had to simplify more than I like. The idea is…

senox13
- 315
- 2
- 10
-2
votes
2 answers
Andventure game problems, moving between rooms Python
So far I am able to get to all rooms except from fight to stairs. I get the description for the stairs to show up but when I try to give it the next direction nothing is recognized.
heres the code:
def playGame():
location = "Porch"
…

Blank1268
- 123
- 3
- 7
- 14