The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Putting two "if"s together
ApeCake Offline
Member

Posts: 116
Threads: 20
Joined: Jun 2012
Reputation: 4
#1
Putting two "if"s together

I do not really need this for my custom story, but I am just incredibly curious about this. The question is; how do you make something happen when two (or three, or four, whatever) things are set "true". Example; I want a message to display when my door is locked and when my doors health is lower than 70.
This is what I wrote, mostly looking at another cs, but then failing horribly. I'm think the concept looks like this though, the only part that this is completely wrong.


void mansion_1(string &in entity)
{
if(GetSwingDoorLocked("mansion_1" && GetPropHealth("mansion_1") == i<70))
{
SetMessage("Messages", "labdoorlocked", 0);
}
}

(mansion_1 is the name of the PlayerInteractCallback of the door, and the actual name of the door.)
This above was just me kinda messing around and trying to figure it out. I couldn't get it complete though. And as far as I'm aware there isn't a solution on the wiki. Any help would be appreciated.
(This post was last modified: 07-05-2012, 09:35 PM by ApeCake.)
07-05-2012, 09:35 PM
Find


Messages In This Thread
Putting two "if"s together - by ApeCake - 07-05-2012, 09:35 PM
RE: Putting two "if"s together - by Obliviator27 - 07-05-2012, 09:38 PM
RE: Putting two "if"s together - by Apjjm - 07-05-2012, 09:38 PM
RE: Putting two - by SilentStriker - 07-05-2012, 09:39 PM
RE: Putting two "if"s together - by himynamebob1 - 07-05-2012, 09:40 PM
RE: Putting two "if"s together - by Your Computer - 07-05-2012, 10:13 PM
RE: Putting two "if"s together - by ApeCake - 07-05-2012, 10:46 PM
RE: Putting two "if"s together - by ApeCake - 07-09-2012, 02:00 PM
RE: Putting two "if"s together - by Cruzore - 07-09-2012, 03:19 PM
RE: Putting two "if"s together - by Apjjm - 07-09-2012, 04:46 PM
RE: Putting two "if"s together - by ApeCake - 07-09-2012, 05:02 PM



Users browsing this thread: 2 Guest(s)