#πŸ”’ help me with creating a game

25 messages Β· Page 1 of 1 (latest)

waxen creek
#

I've just started using python a day or 2 ago and I just don't understand how to make buttons functional, how to import pictures to replace colors, or basically doing anything

earnest impBOT
#

@waxen creek

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

zealous totem
#

What have you made so far and what libraries are you using?

waxen creek
#

(don't mind the colors)

#

I won't push for multiplayer yet, just there for testing out stuff

south crest
#

What library are you using?

#

Or just give the entire code if you don't mind

waxen creek
#

(that's library right)

south crest
#

pygame or pygame-ce ?

south crest
waxen creek
south crest
#

Ok

#

Now people know what to help :) I personally not familiar with pygame tbf

waxen creek
#

I just wanna try to make buttons functional

#

because right now they're literally just gray boxes with words

strange thicket
#

you need to check if the mouse position is inside the coordinates of the box (which you can check using height and width of the box) and then if it is inside and a click event occurs you can draw a different screen

#

and the checking needs to be done in the gameloop of course

waxen creek
#

thanksπŸ‘

#

I'll try

strange thicket
#

you could also use collidepoint

#

this will actually be easier

earnest impBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.