Scripts / Changing the display line of text in a script?

Author
Message
nuncio
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location: Schleswig Holstein, Germany
Posted: 22nd Dec 2015 23:40 Edited at: 22nd Dec 2015 23:43
hi there! i have a little problem.
i have this modified script for the ant eggs. just to remind: i have to destroy X ant eggs until i'm allowed to open a door. this script works.

my first problem was that the text was not displayed in the whole game. i put the script into an object and set it to "always active". now i see the text how many ant eggs are left the whole time. that's what i wanted! GOOD!

now my problem: when this text is displayed all other textparts in the game are not displayed like
"press e to open door" or
"this door is locked"

the line with the text should be at another place, maybe one line higher than all the other text because i guess the text does exist but it's covered by "X of X ant eggs left". i have a screenshot to show you what i mean. when i come close to a door or a key when a text is supposed to be activated it does not appear.

here is the original script (it's part of three scripts so maybe i have to show you the other one when this here is wrong)
http://www.nuncio-rap.de
intel core i5-3570K CPU @ 3.40GHz; 8GB RAM // NVIDIA GeForce GTX560Ti

Attachments

Login to view attachments
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 22nd Dec 2015 23:53 Edited at: 22nd Dec 2015 23:54
You can only have one prompt line at a time, that means you always active prompt will override all others.

Try changing your prompt line to a Text line instead.

change:


to:


In the Panel line the 4 numbers are the co-ordinates of each corner of the background panel.

In the Text line the first two numbers (25,20) are XY positions of the text, the third number (1) id the font size, and the three numbers at the end (0,255,0) are the RBG colour of the text.

So you can move it to any position on the screen and change the font size and colour
nuncio
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location: Schleswig Holstein, Germany
Posted: 2nd Jan 2016 01:38
hi! thank you for this help! i just did a first try with the script that you wrote and what i got is in the screenshot. it works good already but there is a box in the screen that should be removed. i painted a strange picture and i hope it's logical
http://www.nuncio-rap.de
intel core i5-3570K CPU @ 3.40GHz; 8GB RAM // NVIDIA GeForce GTX560Ti

Attachments

Login to view attachments
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 2nd Jan 2016 11:00
Quote: "In the Panel line the 4 numbers are the co-ordinates of each corner of the background panel.

In the Text line the first two numbers (25,20) are XY positions of the text, the third number (1) id the font size, and the three numbers at the end (0,255,0) are the RBG colour of the text.

So you can move it to any position on the screen and change the font size and colour"
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 2nd Jan 2016 17:07 Edited at: 2nd Jan 2016 17:09
Quote: "hi! thank you for this help! i just did a first try with the script that you wrote and what i got is in the screenshot. it works good already but there is a box in the screen that should be removed. i painted a strange picture and i hope it's logical "


If you don't want the background panel, jusr remove the line that starts with panel, you can change the size of it by changing the 4 numbers after panel

To move the text to a different position then change the xyz numbers in the TextColor line
Mariokiki
16
Years of Service
User Offline
Joined: 22nd Oct 2008
Location:
Posted: 2nd Jan 2016 23:41
Another question (if I can...) regarding the background panel...

Is it possible to change the color of it too ?

Thanks !
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 3rd Jan 2016 20:22
I'm not sure about that to be honest, I think it is hard coded as a picture in the gamecore files, you may be able to replace it with a different one there, but I've never really looked into it. However with the new sprite system in place I would assume (I don't know for sure as I haven't looked at it) that instead of using a panel you could place an image sprite.
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 3rd Jan 2016 21:35
Just to clarify, the 4 numbers after panel are in fact two sets of numbers, the first two sets are the X,Y co-ordinates for the top left corner (this is in a percentage not a fixed number) and the second two numbers are the X,Y co-ordinates for the bottom right corner (again a percentage)
nuncio
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location: Schleswig Holstein, Germany
Posted: 3rd Jan 2016 23:26
after playing around for a few hours i finally got it working!

Quote: " if KillCount < 6 then
TextColor(39,94,3,"Blow up all piles of ant eggs! " .. 6 - KillCount .. " left" ,255,255,255)"


this is it and in the screenshots you can see how it looks in my game. this is what i wanted: the text "blow up..." is always active until all eggs are blown away and the regular text parts in the game like "press to..." are also visible. this was a very important part of the process now i can go on working with a good feeling. thank you belidos!
http://www.nuncio-rap.de
intel core i5-3570K CPU @ 3.40GHz; 8GB RAM // NVIDIA GeForce GTX560Ti

Attachments

Login to view attachments
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 4th Jan 2016 08:32
Glad it worked for you, looking great.
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 6th Jan 2016 05:38
For changing the panel border color they are graphics file located here:
Files\languagebank\neutral\gamecore\huds\panels

I use colorize on them and made them red. But then every game will be red from then on out.
I saved color versions in folders to switch out as I need to.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Mariokiki
16
Years of Service
User Offline
Joined: 22nd Oct 2008
Location:
Posted: 6th Jan 2016 15:53
thanks Pirate Myke for the tip !
PM

Login to post a reply

Server time is: 2024-12-22 10:35:43
Your offset time is: 2024-12-22 10:35:43