Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Display message when player tries to use lantern
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#7
RE: Display message when player tries to use lantern

Personally I'd go with Daemian's suggestion. It will immediately turn the lantern back off after attempted enabling, which will also trigger the callback. Though I guess he hastily wrote the code, as it's not 100% correct:

PHP Code: (Select All)
void OnStart()
{
    
SetLanternLitCallback("DenyLantern");
}

void DenyLantern(bool bState)
{
    
SetLanternActive(falsefalse);
    
SetMessage("Messages""NoLantern"5);


Keep in mind it will still play the sounds of the player enabling the lantern.

(This post was last modified: 05-27-2016, 06:33 PM by Mudbill.)
05-27-2016, 06:31 PM
Find


Messages In This Thread
RE: Display message when player tries to use lantern - by Mudbill - 05-27-2016, 06:31 PM



Users browsing this thread: 1 Guest(s)