Variables in IF Statements /u/SnowwCastHelpme Python Education

I’m currently making a speed mechanic for a turn based RPG, and I’m struggling to find a way to do IF statements with variable names, so for example, in my code it’s;

if Mercs[0]==character1ATV:

I’m not sure how to search lists for variable names, or if its even possible. If anyone has any help it would be greatly appreciated.

Here’s a google drive link to the code if you want to have a look at it
https://drive.google.com/file/d/1nof3Mno30oIpBL2jiqesus781sWyo_Pw/view?usp=sharing

submitted by /u/SnowwCastHelpme
[link] [comments]

​r/learnpython I’m currently making a speed mechanic for a turn based RPG, and I’m struggling to find a way to do IF statements with variable names, so for example, in my code it’s; if Mercs[0]==character1ATV: I’m not sure how to search lists for variable names, or if its even possible. If anyone has any help it would be greatly appreciated. Here’s a google drive link to the code if you want to have a look at it https://drive.google.com/file/d/1nof3Mno30oIpBL2jiqesus781sWyo_Pw/view?usp=sharing submitted by /u/SnowwCastHelpme [link] [comments] 

I’m currently making a speed mechanic for a turn based RPG, and I’m struggling to find a way to do IF statements with variable names, so for example, in my code it’s;

if Mercs[0]==character1ATV:

I’m not sure how to search lists for variable names, or if its even possible. If anyone has any help it would be greatly appreciated.

Here’s a google drive link to the code if you want to have a look at it
https://drive.google.com/file/d/1nof3Mno30oIpBL2jiqesus781sWyo_Pw/view?usp=sharing

submitted by /u/SnowwCastHelpme
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *