Python Forum

Full Version: Pygame Zero - no actor image
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all, I'm learning pygame zero and am trying to make a version of the gamemaker's apprentice game I've previously done. The attached code runs without any errors apart from the fact that the actor 'baby' created in the update_boss function does not have any image. I have confirmed that the image file is fine by creating the object in a separate file but when this file created, its not visible. The object does exist however, as I can see the score increasing when the object collides with the dragon. I have been looking at this for too long and can't see the error causing the actor image to not be visible. Any help appreciated.
There is no problem with the actor image. You have an error in update_good_babies().
baby.colliderect(dragon) returns True or False.
demon.circle_collidepoints(50, fireballs) returns an int.
Your program treats them like they return the same kind of values.
Thank you! That solved my problem!

(Oct-13-2022, 07:37 PM)deanhystad Wrote: [ -> ]There is no problem with the actor image. You have an error update_good_babies().
baby.colliderect(dragon) returns True or False.
demon.circle_collidepoints(50, fireballs) returns an int.
Your program treats them like they return the same kind of values.