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 Loading Screen text
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
RE: Loading Screen text

Yes. I've done it before in a test map. Use a local variable to track which door the player used. Then use that information to select which loading text to use. Here's an simple example of the script you'd probably use.


PHP Code: (Select All)
void OnStart()
{
    
SetLocalVarInt("doorUsed"0);
    
SetEntityPlayerInteractCallback("door_1""doorInteract"false);
    
SetEntityPlayerInteractCallback("door_1""doorInteract"false);
}

void doorInteract(string &in entityName)
{
    if(
entityName == "door_1"SetLocalVarInt("doorUsed"1);
    if(
entityName == "door_2"SetLocalVarInt("doorUsed"2);
}
void OnLeave()
{
    switch(
GetLocalVarInt("doorUsed"))    
    {
        case 
1:
            
SetupLoadScreen("loadTextCat""loadTextEntry_1"0"img1.jpg");
        break;
        case 
2:
            
SetupLoadScreen("loadTextCat""loadTextEntry_2"0"img2.jpg");
        break;
    }


(This post was last modified: 12-15-2011, 09:04 AM by palistov.)
12-15-2011, 09:02 AM
Find


Messages In This Thread
Loading Screen text - by teddan50 - 12-15-2011, 01:48 AM
RE: Loading Screen text - by palistov - 12-15-2011, 09:02 AM
RE: Loading Screen text - by teddan50 - 12-15-2011, 10:55 AM



Users browsing this thread: 1 Guest(s)