Demo Scene - Display a info screen from trigger

Demo Scene - Display a info screen from trigger
Demo Scene - Display a info screen from trigger
Product Code: 02365
Availability: In Stock
Price: £0.00
Qty:     - OR -   Add to Wish List
Add to Compare
  •  
  •  
  •  
  •  
  •  

Demo Scene - Display a info screen from trigger

Postby liamgibbins » 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.
 

Write a review

Your Name:


Your Review: Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:



Skyline Game Engine - Asset Store © 2017