Scripts / Basic Tutorial Message Script

Author
Message
Nathan38
13
Years of Service
User Offline
Joined: 13th Feb 2011
Location:
Posted: 10th Dec 2015 19:08 Edited at: 10th Dec 2015 19:10
Hi all,
I'm new to LUA and I'm trying to write a basic script, this is my first time. I have done some Java programming before, however this is a completely different beast. Basically when the player enters a triggerzone, I want the player and the game to be paused, then an image loads in the center of the screen. When the player presses the E key, I want the game to continue as normal and the image disappear.



That's what I've got so far but it doesn't work, can anyone help please?

Regards,
Nathan

EDIT:
I forgot to mention that I used the script from the cellshaded example called note00__ or something along those lines so I'm sorry if it doesn't make any sense
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 10th Dec 2015 21:06
Hi Nathan38,

This should do what you want.
I have placed comments in the script to help step you through the sequence.
See the link below for more details on the commands.
http://steamcommunity.com/sharedfiles/filedetails/?id=398177770&insideModal=1

Cheers

Desktop: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 CPUs), ~3.6GHz, Windows 8.1 64-bit, 16 GB Ram, NVIDIA GeForce GTX 750 Ti, Display Memory: 4018 MB. Resolution 1360x768, Passmark 3528.
Laptop: Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
Nathan38
13
Years of Service
User Offline
Joined: 13th Feb 2011
Location:
Posted: 11th Dec 2015 15:03
Wow, thank you so much perelect, it's perfect! do you know if the images scale with screen resolution? lets say I create a 720p image and with the intention of viewing it in game at a resolution in 1080p, it wont cover the entire screen right, but if I use that same image in game at a 720p resolution, would it cover the entire screen or scale down?

Thanks again!
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 11th Dec 2015 18:41
old images dont scale but the newly added sprites do and although it's slightly more code to get them in they work a lot more naturally
like so




life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11
Nathan38
13
Years of Service
User Offline
Joined: 13th Feb 2011
Location:
Posted: 11th Dec 2015 21:57
Thanks very much @smallg, I will be studying that script closely and the link that @perelect posted so I can get to grips with this LUA thing, thank you both very much!

Login to post a reply

Server time is: 2024-12-22 10:11:07
Your offset time is: 2024-12-22 10:11:07