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 / why dosent this work? SetTextPOsition

Author
Message
haliop
User Banned
Posted: 21st Aug 2012 07:55
ok so i have this commands in a loop



but it seams that it dosent work, the aim is to get the text bigger every loop and repositioning it at the center of the screen every time, in theory this should work but in real it dosent.. any way around this?

Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 21st Aug 2012 09:22
You haven't shown enough of your code. Show us the loop code.

But just as a guess, do you have a sync command in the loop?

haliop
User Banned
Posted: 21st Aug 2012 10:05 Edited at: 21st Aug 2012 10:06
ofcourse there is a sync command this is the main loop
ok its something like:



Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 21st Aug 2012 10:39
I assume you have text = createText() or something similar?

I'm on a mac right now so can't test any BASIC code.

Just for clarity, add a ', 1' to the inc statement so you have:

inc TextSize, 1

haliop
User Banned
Posted: 21st Aug 2012 12:22
ive added 1 but still the same problem

Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 21st Aug 2012 14:31
haliop, have you provided the entire code? It may be something to do with how you have set up your display (Virtual vs Percentage). I have copied your code exactly, and it works fine on my machine...
haliop
User Banned
Posted: 21st Aug 2012 17:40
im working with percentage .. i dont understand why it dosent work on my end..

Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 21st Aug 2012 18:02
If you are using the percentage system then I believe this is your problem...

You currently have this:



Lets say for arguments sake your text width is 200. You are trying to position the text at 150 (50 + (TextWidth / 2)) which would be way off the screen (the total screen size when working with percentage would be 100x100)...
haliop
User Banned
Posted: 21st Aug 2012 20:40
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 21st Aug 2012 21:12
Is this what you are after?

haliop
User Banned
Posted: 22nd Aug 2012 07:39
haliop
User Banned
Posted: 22nd Aug 2012 07:47
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 22nd Aug 2012 14:56
Just for clarity you don't need to set the position and alignment every loop to get that effect, just the text size.


this.mess = abs(sin(times#))

Login to post a reply

Server time is: 2024-11-23 20:19:58
Your offset time is: 2024-11-23 20:19:58