12-12-2015, 04:30 AM
Code:
for event in pygame.event.get():
if event.type == pygame.MOUSEBUTTONDOWN:
mouse_pressed == 1
if mouse_pressed == 1:
stuff()
ty
for event in pygame.event.get():
if event.type == pygame.MOUSEBUTTONDOWN:
mouse_pressed == 1
if mouse_pressed == 1:
stuff()
(12-12-2015, 04:33 AM)Sans Wrote: [ -> ]http://bfy.tw/3FO5 might help you out
(12-12-2015, 04:39 AM)m0dem Wrote: [ -> ]Your name just screams spam and cancer. Really.... a user named "xxxxxxxxxxxxxxxxxxxxxxxxx"... and a thread named "L"...
I suggest you clean up, before @roger_smith cleans up
(12-12-2015, 04:41 AM)xxxxxxxxxxxxxxxxxxxxxxxxx Wrote: [ -> ]Sorry for not having the most HQ title or my username not being up to your standards Mr. m0dem!
(12-12-2015, 04:47 AM)m0dem Wrote: [ -> ]The title isn't "not HQ", it isn't even a title!!! You can change it to be more like... a title... by editing you main post. (for example, Pygame Mouse Events Trouble)
btw: Do you still need help with your script?
for event in pygame.event.get():
if event.type == pygame.MOUSEBUTTONUP:
# do stuff...
(12-12-2015, 07:51 PM)m0dem Wrote: [ -> ]@xxxxxxxxxxxxxxxxxxxxxxxxx
I assumed you had initialized everything else (the screen) before the loop through events, right?
You have to initialize the window or it will not work.
I don't know if Pygame is what you are looking for if you just want to get key presses...