Hi,
I am only new to GG, I can help with the text and the position of text.
To get you started until someone else offers you help.
I have attached my learning script for text I made with the different commands that are available.
Tip: To get different colour codes for R,G,B I just use Microsoft Paint. Click on edit colours pick the colour you need and read its R,G,B as needed.
-- Script by perelect
-- My learning script for the different text and prompt commands.
-- Place a barrel on the map and assign this script to it and set Static to NO, and assign an optional soundfile to sound 0 if required.
-- Place your players start marker within 1000 units of the entity for the below script to work.
-- Once you move more than 1000 units away from the entity, it destroys the entity.
function texttest_init(e)
end
function texttest_main(e)
PlayerDist = GetPlayerDistance(e) -- Gets the distance between the player and the entity and writes its to the PlayerDist variable.
if PlayerDist < 200 then -- Runs the code inside this IF, while the player is less than 200 units from the entity with this script.
PromptTextSize(3) -- Sets the prompt size to 3
Prompt("This is the Prompt(str) command") -- Displays text string at the base and centre of the screen.
TextCenterOnX(10,80,3,"less than 200 away")
elseif PlayerDist > 200 and PlayerDist < 1000 then -- Runs the code inside this elseIF, while the player is greater than 200 units and less than 1000 units from the entity with this script.
Text(84,79,3,"Text Command") -- Displays text using (size) at the relative screen position X,Y which have a value between 1-100%
TextCenterOnX(10,80,3,"more than 200 away")
elseif PlayerDist >= 1000 then -- Runs the code inside this elseIF, while the player is greater than or equal to 1000 units from the entity with this script.
TextCenterOnX(10,80,3,"more than 1000 away")
PromptTextSize(5) -- Sets the prompt size to 5
PromptDuration("GAME OVER",5000) -- Displays the text for 5 seconds.
PlaySound(e,0) -- Plays the sound that is assigned to slot 0 in properties settings of the entity
Destroy(e) -- destroys the entity
end -- end if
-- Everything below here is always shown on screen while the entity exists
PromptLocal(e,"This is a barrel") -- Prints the text at the base of the entity with this script
TextCenterOnX(50,8,3,"This is TextCenterOnX") -- Prints the centre of the text string at the x position
-- TextColor(1,3,2," text",255,255,255) -- TextColor(x startposition,y startposition,fontsize," The Text U see ",Red ,Green ,Blue)
-- X and Y are % of the screen size
TextColor(1,3,3," UNDER",255,255,255) -- displays text under the panel
Panel(0,0,12,15) -- Panel(x,y,x2,y2). -- displays a panel -- Panel(x start,y start ,x end,y end)
TextColor(1,7,3," ABOVE",255,255,255) -- displays text above the panel
TextColor(1,12,2,"Distance = "..math.ceil(PlayerDist),255,255,255) -- displays the players distance from the entity with this script
TextColor(85,7,2," ITEM 1",0,0,0) -- font size 2 in black text
TextColor(85,10,3,"ITEM 2",0,255,255) -- font size 3 in light blue text
TextColor(85,12,4,"ITEM 3",255,0,255) -- font size 4 in pink text
TextColor(5,35,3,"RED ",255,0,0) -- Red Text
TextColor(5,40,3,"GREEN ",0,255,0) -- Green Text
TextColor(5,45,3,"BLUE ",0,0,255) -- Blue Text
end -- end function
I may be old, but at least my memory still ....hmmm
Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2789 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)