#๐Ÿ”’ some weird problem

56 messages ยท Page 1 of 1 (latest)

unreal yew
#

i want to fix the attack range but i don't know how at first i thought i knew how to do it but when i tried it now it didn't work if anyone could help me in doing it in this code : https://paste.pythondiscord.com/TOTQ

cedar pebbleBOT
#

@unreal yew

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.

unreal yew
#

anyone for help please

craggy nebula
#

this is slightly unrelated but what is this?

#

You should remove the asterisks

unreal yew
#

ok i just gave it to copilot to trview and change something in the controls and it changed some other things that i fixed but ok ididn't see that

craggy nebula
#

I can't actually run your code because of all the image references

#

so right now I'm just replacing them with my own this might take a bit

unreal yew
#

ok sorry

#

lol

craggy nebula
#

ok so uh

#

this is the hitbox for your attack

#

and you want to change its range right

unreal yew
#

and i don't understand but even when i reduce the offset he just attacks in the same range but from his back

unreal yew
craggy nebula
#

ok i think you are a bit confused about something

#

let me draw a picture because I'm bad at explaining stuff lol

craggy nebula
#

and if the offset is negative then it will be behind the player

unreal yew
#

oh ok

#

so how to change the range because i thougght that it was the thing changing the range lol

craggy nebula
#

which attack do you want to change the range for?

unreal yew
#

because if you try the code the attack has a very longr-ange

#

both

#

i just want to understand how to change it

craggy nebula
#

alright

#

sorry its taking me a while to read all of this code and figure it out ๐Ÿ˜…

unreal yew
#

no prob

#

i think i shoul simplify it if i could because it's a litlle complicated in the way i wrote it i guess

craggy nebula
#

where in the code is the normal attack being rendered...?

#

i can't find it for some reason and i feel dumb

unreal yew
#

wait

#

oh i just found it

#

lol

#

you know what wait a minute i guess i have a clue

craggy nebula
#

ok i thought i figured it out

#

but i actually didn't

#

and i have no idea what your code is doing

#

where are the attacks being rendered??

unreal yew
#

i think you should change this (sorry but i'm currently not using a mouse)

craggy nebula
#

oh yeah thats right

#

you can do this to make it easier to see whats happening

#

to change the size of the attack

#

you just need to change the 300 and the 80

#

attack_rect = pygame.Rect(x, y, width, height)

unreal yew
#

wait

#

ah ok

craggy nebula
#

idk if that helps at all

unreal yew
#

no differenc even when i change it lol

#

i found it and it worked

#

lol

#

but not correctly no way

cedar pebbleBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, 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.