Re: [Tutor] Umm.. I need help on changing Global Variables.

2015-01-31 Thread Dave Angel
On 01/29/2015 12:16 PM, Tallen Grey Smith wrote: So, I’m trying to make a very simple game that involves time management properly, but I’m having an issue. thats my code, and I want it to where if I type charge it’ll make my charge go up 10, my steps go down 1, my divs going down 1, and

Re: [Tutor] Umm.. I need help on changing Global Variables.

2015-01-29 Thread Alan Gauld
On 29/01/15 17:16, Tallen Grey Smith wrote: def game(): global level global player_health global enemy_health global steps global civilians global charge This is fine. But it only tells this function to treat them as globals. def charge_1(): level p

[Tutor] Umm.. I need help on changing Global Variables.

2015-01-29 Thread Tallen Grey Smith
So, I’m trying to make a very simple game that involves time management properly, but I’m having an issue. level = 1 player_health = 100 enemy_health = 100 steps = 10 civilians = 20 charge = 0 name_2 = 'Bob' def game(): global level global player_health global enemy_health globa