Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ChikenMilk

Pages: [1]
1
General / Re: Unable to reference position in differen't script
« on: July 20, 2021, 03:11:49 am »
These are the header files

Ball
(click to show/hide)

Bot
(click to show/hide)

Since it's not working then I'm guessing this is the wrong way to reference it to get stuff from it.

2
General / Re: Unable to reference position in differen't script
« on: July 19, 2021, 11:18:49 pm »
That was me attempting to see if setting it inside of the bot would've actually set the position correctly, which it didn't.

3
General / Unable to reference position in differen't script
« on: July 19, 2021, 10:13:44 pm »
I'm attempting to make Pong in SFML and trying to make a bot to play against. But when I try to reference for the balls Y position inside of the bot it's only giving me the initialized position and not updating for the current position. The position does update inside of the ball script itself but when taking it to the bot it just stays put.I'll include the two CPP files just in case it can help.
Bot
(click to show/hide)
Ball
(click to show/hide)

New to SFML so my code probably looks weird.



Pages: [1]
anything