help with walls (python) please?
Hi all, i am trying to make a wall class so that there are boundries on the map that a player can't pass. i am so sorry for being stupid or some thing lol, but i've tried googling this, but no luck at all. I've had more luck with the string_contains thing i was looking for, but not with what i am trying to do here.
so what i want to do is have a minimum x for the wall and a maximum x for it, to determine the length of the wall.
I reelly don't know how to aproach this... can any one please help me? here is the code:
import globals
walls=[]
class wall:
def __init__(self,min_x,max_x):
self.min_x=min_x
self.max_x=max_x
def spawn_wall(min_x,max_x):
walls.append(wall(min_x,max_x))
def wloop():
for i in walls:
if globals.x in range(i.min_x, i.max_x):
globals.p.play_stationary("wall.ogg",False)
globals.x-=1
Don't worry, the only reason why i am using a globals file instead of a player class, is because this was just supposed to be for testing purposes, but i don't understand how to aproach this at all.
sorry for asking.
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector