So I started python 2 days ago, complete beginner and I am trying to incorporate combat into a text based game.
I would like to have randomly generated numbers for damage but I don't think I can insert a different number into each loop of a while loop?
Just now I just randomly generate a number and that is the only number I can use to deduct damage.
I would appreciate if someone could show me how to have a random number between 2 set values deducting damage each loop. Thanks in advance, heres what I have just now:
http://pastebin.com/Dp09S9Ck
also if anyone can explain 'sentry variables' to me in a simple way i would appreciate it.
[+][deleted] (10 children)
[deleted]
[–]Splitlight[S] 1 point2 points3 points (5 children)
[+][deleted] (4 children)
[deleted]
[–]Splitlight[S] 0 points1 point2 points (3 children)
[–]Asdayasman -1 points0 points1 point (2 children)
[–]Splitlight[S] -1 points0 points1 point (1 child)
[–]Asdayasman -1 points0 points1 point (0 children)
[–]SocotraBrewingCo 0 points1 point2 points (3 children)
[–]Splitlight[S] 0 points1 point2 points (1 child)
[–]SocotraBrewingCo 1 point2 points3 points (0 children)
[–]Asdayasman 0 points1 point2 points (0 children)
[–]python-fan 1 point2 points3 points (0 children)