0

there is an example in stackoverflow, it is runing under the titel: Make a line as a sprite with its own collision. There is an example from Rabbid 76.I want to modify the example.

I want to get a message in the moment when the line hits the image. For example "hit" appears, which disappears again after 1 seconds. Then a second message comes up for 1 seconds when the line leaves the picture.

Joachim
  • 267
  • 1
  • 7
  • 1
    I saw the example. But i work with spritegroups. When the line finish the collide with the picture, how get the information about that and how do i rect.x and rect.y from the line in that moment? – Joachim Feb 20 '22 at 08:23
  • See [Pygame "pop up" text](https://stackoverflow.com/questions/70996802/pygame-pop-up-text/70996856#70996856) – Rabbid76 Feb 20 '22 at 08:25
  • I saw and understand pop up text. That don't solve my problem. I give up. – Joachim Feb 20 '22 at 08:48
  • 2
    Your question is _"[...] For example "hit" appears, which disappears again after 1 seconds [...]"_. This is exactly what is shown in [Pygame "pop up" text](https://stackoverflow.com/questions/70996802/pygame-pop-up-text/70996856#70996856). If this answer doesn't help you, you need to provide a [Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) and exactly explain where you struggle. – Rabbid76 Feb 20 '22 at 09:29

0 Answers0