Hi I'm trying to follow these instructions from my last question: Pygame: how to load 150 images and present each one for only .5sec per trial
This is the code I currently have and I'm unsure where I'm going wrong.
import pygame, glob
pygame.init()
pygame.mixer.init()
clock=pygame.time.Clock()
#### Set up window
window=pygame.display.set_mode((0,0),pygame.FULLSCREEN)
centre=window.get_rect().center
pygame.mouse.set_visible(False)
#colours
black = (0, 0, 0)
white = (255, 255, 255)
types= '*.tif'
artfile_names= []
for files in types:
artfile_names.extend(glob.glob(files))
image_list = []
for artwork in artfile_names:
image_list.append(pygame.image.load(artwork).convert())
##Randomizing
index=0
current_image = image_list[index]
if image_list[index]>= 150:
index=0
stimulus= pygame.image.load('image_list')
soundPlay=True
def artwork():
window.blit(stimulus,pygame.FULLSCREEN)
while not soundPlay:
for imageEvent in pygame.event.get():
artwork()
pygame.display.update()
clock.tick()