Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Going Insane! This doesn't make sense..

Author
Message
JLMoondog
Moderator
16
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 30th Nov 2013 20:02 Edited at: 30th Nov 2013 20:05
Code:


Image:



If I rem out the Scale command I can see the corner of the logo...this makes no sense. Why aren't the commands doing what they're suppose to do? Offset the sprite then position by offset?? I've used these commands a billion times with no issues.

Trying to add a loading image to the start of my program. I really can't figure out why it isn't working. o.o

Image and Sprite #19 are not used anywhere else ever and the depth is set higher than any other sprite. Frustration!

Thanks guys!

Inmortalis Nox

Attachments

Login to view attachments
JLMoondog
Moderator
16
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 30th Nov 2013 20:07 Edited at: 30th Nov 2013 20:21
Haha! Never mind...I'm stupid sometimes...



Inmortalis Nox

Attachments

Login to view attachments
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 30th Nov 2013 20:51
I was going to mention that you didn't set a virtual resolution...lol as if you don't the placement on screen is between 0.00 to 1.00 max

but I see you must have caught your mistake...



JLMoondog
Moderator
16
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 30th Nov 2013 21:45
I was using the percentage system..but for some reason I was thinking percentages when I set the sprite's offset. Then I was setting the sprite's scale and not size..ugh lol! It's been a long holiday weekend.

Inmortalis Nox
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 1st Dec 2013 12:33
Josh, unless you have changed the offset previously, you do not need to set it to the center. By default SetSpritePositionByOffset is already the center of the sprite... In case you didn't know...
JLMoondog
Moderator
16
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 1st Dec 2013 12:59 Edited at: 1st Dec 2013 13:00
You don't have to set the offset if using SetSpritePositionByOffset()?? You sure? I'll have to test that theory lol. I'm pretty sure you have to set the offset beforehand. Otherwise how does it know how much to offset it by when positioning?

I also use this in my main loop because the size is constantly changing.

Inmortalis Nox
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 1st Dec 2013 13:07
Not if you want the offset centered. It is centered by default... Try it
JLMoondog
Moderator
16
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 1st Dec 2013 14:02
I swear the code description says it positions with the top left corner of the sprite. I'm going to try it lol.

Inmortalis Nox
baxslash
Valued Member
Bronze Codemaster
18
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 1st Dec 2013 19:42
Funnell7 is right

oct(31) = dec(25)
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 1st Dec 2013 20:17
Baxs I think you missed the word 'always' in that sentence. Haha I joke of course, just ask the missus...
JLMoondog
Moderator
16
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 1st Dec 2013 22:06
You're right! Lol. *Bows before the coding King*

That's so weird...at least before my code still worked with other programs.

Thanks guys!

Inmortalis Nox

Login to post a reply

Server time is: 2025-05-23 16:22:28
Your offset time is: 2025-05-23 16:22:28