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 [SOLVED] Checking for multiple items
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Checking for multiple items

There is an "else" keyword you can use. It's very simple.

PHP Code: (Select All)
void LeavingHouse(string &in asItemstring &in asEntity)
{
    if(
HasItem("BarricadeLockKey") == true
    
&& HasItem("CarterIslandEntranceKey") == true)
    {
        
SetLevelDoorLocked("HouseDoor"false);
        
PlaySoundAtEntity("""unlock_door""HouseDoor"0false);
        
CompleteQuest("LeaveHouse","LeaveHouse");
    }
    else 
SetMessage("MessageCategory""GrabKeys"3);


It's pretty much just like that. Add the proper message category and entry in your .lang file. You can make else into a block if you want to use more than 1 line.

(This post was last modified: 04-25-2014, 05:15 PM by Mudbill.)
04-25-2014, 05:13 PM
Find


Messages In This Thread
RE: Checking for multiple items - by Mudbill - 04-25-2014, 05:13 PM
RE: Checking for multiple items - by Pshyched - 04-25-2014, 05:39 PM



Users browsing this thread: 2 Guest(s)