Scripts / Text Display On Top Of Image

Author
Message
Nevin
8
Years of Service
User Offline
Joined: 19th May 2015
Location: U.S.A
Posted: 30th Oct 2016 20:07

Hello,

I'm doing a little test and wanted to know if it was possible to change it so text will stack on top of an image.

If you set an image on the sceen and text at the same positions, the image takes priority, blocking the text.

Anyone know of a way to have text take priority and stack on top?
Last edited by Nevin; Just now
Nevin
8
Years of Service
User Offline
Joined: 19th May 2015
Location: U.S.A
Posted: 30th Oct 2016 21:31
Nevermind. I found usings the same idea as the Start,LoadGame,About on the title menu, seems to be what i'm looking for.
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 30th Oct 2016 22:21
You need to use the sprite commands to paste it on the lowest layer:

SetSpriteDepth (sprite name_sprite, 100)
SetSpritePosition(sprite name_icon,200,200)
PasteSpritePostion(sprite name_icon,50,50)

Basically what you are doing is creating a sprite, then moving it off of screen, then pasting a copy of that sprite at the correct position using the depth command to put it at the lowest depth, then any text placed at that position will be on top.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
gd
7
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 8th Nov 2016 12:47 Edited at: 8th Nov 2016 13:00
Hi Belidos, do you have a working lua script example. Maybe in a zip with script and an image if possible as for some reason I can't get it to work either lol

In the screenshots below the text shows up under the image but I need it to show on top.


^ Image without the scroll and the text will show through ^



^ Image with the scroll and no text showing ^


I am using just one image for this character sheet. I have just switch off the layer for this example.
This is a WIP so all the stats will be off lol

Any help would be great

Thanks.
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 MDA mode, Water cooled with an old Victorian cast iron radiator and a industrial leather belt driven fan - That's what you call Steampunked.

Laptop - M17xR3

Attachments

Login to view attachments
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 8th Nov 2016 13:40 Edited at: 8th Nov 2016 13:53
Here you go.

Note: i've used variables for the size, and position of the sprite and the text, along with variables for the text colour. I prefer doing it this way because then it's easier to make changes when you need to.



i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.

Attachments

Login to view attachments
gd
7
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 8th Nov 2016 13:58 Edited at: 8th Nov 2016 14:08
No problem I have sorted it from this post Getting text behind the sprite


^ Screenshot of it working ^
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 MDA mode, Water cooled with an old Victorian cast iron radiator and a industrial leather belt driven fan - That's what you call Steampunked.

Laptop - M17xR3

Attachments

Login to view attachments
PM
gd
7
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 8th Nov 2016 14:00 Edited at: 8th Nov 2016 14:02
Hi Belidos, just seen your post but found the answer too lol

It will still be good for others tho coming across this thread.

Thanks again.

Plus that was fast too...

I must remember to refresh my browser page and close some windows.
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 MDA mode, Water cooled with an old Victorian cast iron radiator and a industrial leather belt driven fan - That's what you call Steampunked.

Laptop - M17xR3
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 8th Nov 2016 14:05
Quote: "Plus that was fast too..."


I was actually working on a hud script at the moment i saw your post, so had the basics at hand, just needed to delete everything you didn't need and zip it up lol

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
gd
7
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 8th Nov 2016 14:09
Thanks again Belidos.
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 MDA mode, Water cooled with an old Victorian cast iron radiator and a industrial leather belt driven fan - That's what you call Steampunked.

Laptop - M17xR3
PM

Login to post a reply

Server time is: 2024-04-30 11:54:24
Your offset time is: 2024-04-30 11:54:24