Resources
Skyline resources; Third party applications, Demo Scenes, Action plug-ins, Action Scripts, Presets etc any thing that can be used by Skyline

Demo Scene - Display a info screen from trigger

Demo Scene - Display a info screen from trigger

Postby epsilonion » 07 Sep 2015, 15:49

Introduction
In this demo scene you walk into a trigger that displays a GUI giving information to the player, this is useful for gaining intel, telling a story etc etc.

I will update later on with the FPS version as you have to disable the HUD to be able to click any buttons on the GUI.

Whats wrong?
If your in FPS player supplied with skyline when you hit the trigger it displays the GUI fine but but the FPS HUD covers the button so you have to disable the HUD while the GUI is active. I have this working but still need to do some work on it.

In 3rd person mode you need to change the TAG to "Player" for it to work, again you get the following error when you click exit on the GUI.

More Info
When the button is clicked it uses
Code: Select all
 lua(infotrig,infoButtonEvent,1)


The infotrig is the ID of the trigger that holds the script that it is to call.
infoButtonEvent is the function within the script that the button calls.
"1" is the function argument that it passes.

this is usefull if you have more then one button then you can pass 1, 2, 3 etc and use a if statement to separate the buttons in you code. if (button) == "1" then, if (button) == "2" then etc etc.

if the button can not find the entity that holds the script then you will get a -1 error.

Instructions
Extract the zip file to your projects main directory, the file contains a script file, scene and GUI.


Files
Tatty-GUIfromcollision.zip
3RD Person -- Display GUI from a collision
(2.01 MiB) Downloaded 463 times
User avatar
epsilonion
Skyline Lead Moderator
Skyline Lead Moderator
 
Posts: 874
Joined: 26 Feb 2015, 11:51
Location: Hull, East Yorkshire, England
Skill: Business Manager
Skill: Great creative

Re: Demo Scene - Display a info screen from trigger

Postby SolarPortal » 07 Sep 2015, 20:55

thx liam. The more resources the better ;)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Demo Scene - Display a info screen from trigger

Postby StarFire » 09 Sep 2015, 20:24

@Liam just a thought but, how about putting your ui assets on the store? ;)
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Demo Scene - Display a info screen from trigger

Postby epsilonion » 09 Sep 2015, 21:02

I am going to matey, put here first in case someone has any comments on the UI stuff first.
Was going to make a pack of UI demo scenes but having difficulty figuring out how to get the settings menu adjusting settings, theres nothing in the API to reference (resolution, etc in the API), the settings menu that you game me in another thread has the rml files but no referencing script with it.. lol.
User avatar
epsilonion
Skyline Lead Moderator
Skyline Lead Moderator
 
Posts: 874
Joined: 26 Feb 2015, 11:51
Location: Hull, East Yorkshire, England
Skill: Business Manager
Skill: Great creative

Re: Demo Scene - Display a info screen from trigger

Postby SolarPortal » 09 Sep 2015, 21:22

All the lua script commands for getting and setting the Game options is in this file:

$(Skyline_SDK)\Skyline\Data\Scripts\SceneScript_GUI.lua


Q) What is this file? A) This file is added into the header of every single sceneScript in every scene so the options menu can be adjusted without any user interaction. It also gives a customization option for the end user to take over with.

In the script file, most of the functions are too do with getting the property data as you said yourself, but at "line: 207 .... 218" are all the set commands you need. The variables and data to pass through them is all available from the script file. :)

Hope this helps :D
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Demo Scene - Display a info screen from trigger

Postby epsilonion » 11 Sep 2015, 21:16

Pushed the scene to the asset store.. :D
User avatar
epsilonion
Skyline Lead Moderator
Skyline Lead Moderator
 
Posts: 874
Joined: 26 Feb 2015, 11:51
Location: Hull, East Yorkshire, England
Skill: Business Manager
Skill: Great creative

Re: Demo Scene - Display a info screen from trigger

Postby epsilonion » 08 Oct 2015, 14:28

There is now a plugin that makes it easier to open info screens like noted on paper, stuff like like...

Look here for the new improved version: http://blog.aurasoft-skyline.co.uk/mechanics-action-based-activate-message/

:P
User avatar
epsilonion
Skyline Lead Moderator
Skyline Lead Moderator
 
Posts: 874
Joined: 26 Feb 2015, 11:51
Location: Hull, East Yorkshire, England
Skill: Business Manager
Skill: Great creative


Return to Resources

Who is online

Users browsing this forum: No registered users and 8 guests

cron