Added: 3 years ago
From: ScrewTheLotOfYou
Views: 3,603
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (21)

Sign In or Sign Up now to post a comment!
  • :RC1

    cls

    echo Good Luck!

    set /a chanceVar= %random% %% %3%

    set /p chanceVar= %random% %% %2%

    if /i %chanceVar% lss %2% goto You Win

    if /i %chanceVar% lss %1% goto You Win

    if /i %chanceVar% lss %3% goto You Lose

    this is the code I have but it always goes to you win did i do something wrong? if you can, plz try it out

  • Hey man, thanks for the tutorial. I think it's cool how you have your own website and everything where you've made some games. But anyway, I used your random number generation to help me in this game I'm making called Dwarven Seige. I used the number generator to estimate critical strikes in battle.

  • is there any way to make a batch file type on other things besides the cmd? like if iw anted it to type google it could do that :o?

  • Fuu, no matter what I write, it says either "Enter numerator" or "Enter the minimum value the number can take"

  • SUBSCRIBE! :D

  • I'm gonna use this as a map generator in a video game mod :)

    I'm also making a random maze generator too, again this is useful.

  • 2:38 u skipped a 1

  • hello, i make a adventure game.

    But i wanna do a random amount of money u get when u kill a monster, how do i do that?

    can u give me code or something? or explain, thanks!

  • can you use letters instead of numbers or use both

  • Wow this is impressive! Way too complex for a noob like me. ;)

    Would it be possible to use a part from the code to set a wait command for a random number in seconds?

  • I made a "guess the number" game. But i use %random% to get the number.. how do i set a range from like 1-150? can you even do that? please help. Not from a begining coder either. somebody who knows what they are saying

  • Yes you can, to generate a number from 1-150 in a batch file do this:

    set /a RandomNumber= %random% %% 150 + 1

  • thanks a bunch...reall y helped... ima subscribe because u helped me :D

  • @ScrewTheLotOfYou ok so im also making a guess the number thing except its in a quiz type thing how do i make a number for 1-100 it looks somin like this: :question2 cls echo This one you must guess a number from 1-100 if you miss it you have the direct--- echo ability to get back to this ASAP.--- echo.---- echo What is my number?--- echo.--- echo- -- echo.------- set /a RandomNumber= %random% %% 100 + 1--- if %input% gtr %random% goto question2 if %input% lss %random% goto question2 pause
  • @jupitertree1 in other words how do i make the setup to do random # that u have to guess

  • @ScrewTheLotOfYou Thank you very much! I'm going to make a tic tac toe batch file game and then i need

    to know if naught's or cross' start :)

  • Awesome Video 5/5

    Also I downloaded a most of your batch files off your site. They're beast!!

    One question though.  How do you find enough time to right them, and how do you know all those more complex codes?

  • Thank you! :D

    Believe it or not it doesn't take that long to write them! In general it'll take a week to write one from scratch. I only write them at nights after a day working.

    I don't know any special codes, it's all standard batch code. I just try lots of different things :)

  • @ScrewTheLotOfYou give me code

  • great video, you really are skilled with batch

  • Thanks very much! :)

  • @ScrewTheLotOfYou Wher did you learn batch? Please answer quickly!!

  • oh and i feel like making an RPG with a batch file, how hard do you think it will be?

  • Not too hard actually! It depends how complicated you want to make it though, making your character and having battles with 'monsters' wouldn't be too hard, and would be a great place to use my random chance generator (Better attacking skills means a better chance of hitting, or something along those lines).

    It would have to be text based unless you perfected the video technique you talked about earlier :P

    Give it a go!

  • nice this will definitely be used by me

    great job once again 5/5

    p.s.

    if you can take a challenge i challenge you to make a video using batch files, i tried and failed multiple times XD

  • Thanks very much!

    I did it because I so often see poorly made and slow random number generators, and people always want to add random chance to their games :)

    Hahah, I don't think I'll try making a movie, art's not my forte and it would be difficult to ensure a continuous frame rate. Possible, if you use the windows clock millisecond 'hand'. It's worth a go I guess, but it'd be seriously hard and time consuming :P

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more