- May 2, 2017
- 2,762
- 7,450
I'm trying to simulate keypresses on a Creator Defined Displayable for a minigame in my project, but I've been running into an issue every time I try to implement it.
Here's the thing: In pygame, you simulate keypresses by posting a new event like this:
or
The problem is that this returns me an error in Ren'py like this whenever the event is posted to the queue:
I tried looking for help on stackoverflow, but it seems that this is either an isolated issue to Ren'py or not something a lot of people tried before.
Any help or tips on this would be greatly appreciated.
Here's the thing: In pygame, you simulate keypresses by posting a new event like this:
Python:
pygame.event.post(pygame.event.Event(pygame.locals.KEYDOWN, unicode="a", key=pygame.locals.K_a, mod=pygame.locals.KMOD_NONE))
Python:
pygame.event.post(pygame.event.Event(pygame.KEYDOWN, unicode="a", key=pygame.K_a, mod=pygame.locals.KMOD_NONE))
Python:
EventType object has no attribute "repeat".
Any help or tips on this would be greatly appreciated.