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 / Problem- Cannot find the text i.d. and therefore cannot use 'SetTextPosition"

Author
Message
Mark Garrett
Reviewed AGK on Steam
19
Years of Service
User Offline
Joined: 10th Jul 2005
Location: California, US
Posted: 5th Aug 2017 16:01 Edited at: 5th Aug 2017 17:03


When I run it, error message 'Text 1 does not exist'

All I want to do is print a (float/variable ) at position 50X , 100Y.

I do not want to create a 'text object sprite' because I will be printing a 'float/variable' which will change..........,It is the changing score of the player in a game I'm making.
.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 5th Aug 2017 18:05 Edited at: 5th Aug 2017 18:27
you have to first create the text and give it an id


Some string handling could be used


The text can be changed with the following command as often as you like


The print statement is quite different and useful for outputting stuff to the screen yes but
you cannot control the position of where things are printed with print you only can with the text commands
print is usefull for printing sync rate etc of a program and useful with debugging but for any control you must
use the text commands Please see text in the help file

Print is quite different but if you just want to output some equation

but that will place the first output on the top left of screen on the first line and the next print will be output on the next row
until sync is called which is not a good practice to call more than once in a program (loop)

Quote: "There is no SetPrintCursor commands"
fubar
Mark Garrett
Reviewed AGK on Steam
19
Years of Service
User Offline
Joined: 10th Jul 2005
Location: California, US
Posted: 5th Aug 2017 18:51 Edited at: 5th Aug 2017 19:24
Quote: "SetTextColor( iTextIndex, iRed, iGreen, iBlue, iAlpha )"


What is the 'iAlpha' mean? Is that the background of the text?


Is working now, thanks

.
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 5th Aug 2017 22:56
Alpha is the transparency of the text, 255 being opaque to 0 being transparent

Login to post a reply

Server time is: 2024-09-30 05:32:52
Your offset time is: 2024-09-30 05:32:52