It's because haircut
doesn't equal ('yes', 'y')
.
try
if haircut == "yes" or haircut == "y":
It's because haircut
doesn't equal ('yes', 'y')
.
try
if haircut == "yes" or haircut == "y":
@PowerCoder thanks for the advise, i had considered adding a few of your suggestions before, but i decided to leave it as a very hard simple game. Although I will add a high score and a new game button. I have made a game thats a lot easier and has health bars - I'll put a link when I post it. link
@Axrevyn I can try and do that
@miloplotitsa its just better if the more comprehensive answer is marked as the answer so if anyone else has a similar question they get more help
@sylashur @miloplotitsa this is a better answer
if you get rid of the <form>
everything seems to work fine, i think its because that type of button in a form submits the form and the action attribute of the form is loaded, you can look at it in more detail here
@Ov3R10rd I don't know what you mean by a money related aspect, but if you explained it slightly I'm sure I could add it
@nithilan4 that's the point, you can't beat it
Not sure the AI always works:
https://storage.googleapis.com/replit/images/1548164671314_141d5e7b9476e58b3527d82f4b06350f.pn
@Reader8765 I agree, if you read How To Make A Puzzle Platformer this problem is addressed and fixed. All you have to do is change the !== "1" in the horizontal collisions to === "0" so that it only allows movement when the space in front is a non solid block ("0"). This also allows you to create new blocks that automatically have horizontal collisions.
@MariAmithest the player can move, just right click and it will move towards the cursor
@sylashur that would make the game a lot more interesting and would be fun to make. But it would require a complete overhaul of how the game is already set up. if i was to do this it would be in a completely new project. i'm currently working on something completely unrelated, but when I've finished that i'll consider making something similar to this but with more variety.
@sylashur wow, don't get any better or i'll have to make it able to display triple digits properly!
@henryeth that's pretty good, just getting past 10 is impressive!
@yuhuiguo just hold down right click
@henryeth how many kills did you manage to get?
so would this be a website? or something more like discord? and how are you expecting it to make profits?
@Axrevyn sorry i cant be more of a help, i don't have a lot of experience with python
@Axrevyn yes, and it does, item1 is defined as "sword" but only in get.py. if you define item1 as "sword" in main.py first, then it does show it in the inventory.
@Axrevyn well the thing going wrong is Item1 not being defined in inv.py
Item1 is only defined in the get.py file, in the other two its undefined. I don't know python so i cant help you with fixing it, but as far as i can tell the problem is that they're in separate files.
its because you didn't assign a variable to random.choice(Idunno3)
try changing it to
Idunno3 = random.choice(Idunno3)
that should work
what language is this in? and in what context are you using it?
in most languages break
is used to break a loop
for(let i = 0; i < 10; i++){
if(i === 5) break;
console.log(i);
}
this outputs the numbers 0 to 4, because when I is 5 it breaks the loop.
the correct syntax is just break
no ()
. I hope this is helpful
@OliviaDennis i can see why, its just a typo
if (fromUnit === "Foot" && toUnit === "Miles"){
resultAmt = footToMile(fromAmt);
}
should it be toUnit === "Mile"
instead?
resultAmt is undefined, .toFixed(3)
cant be used on an undefined variable. none of the conditions assigning a value to resultAmt are true
you're using apostrophes to notate the strings, if you want to print an apostrophe instead of ending the string then you can either doprint("'")
orprint('\'')
@malvoliothegood yeah i've not used forms before, as far as i could tell it only refreshes when an action i'snt specified
@EduardoRicardez Oh sorry, I edited the code after posting this and it starts on 12 instead of 21 like the tutorial says, the version you played would have been impossible. I'll change it back to 21, and your first go should be 1, and then stick to multiples of 4
@Julesdsf its a tutorial for how to make the mechanics of the game, the level i made is just to showcase the different mechanics. Its just a framework for you to add things to. If you decide to make the game then you can design your own levels and choose how you win