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
Multiple "if" statement
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#1
Multiple "if" statement

I scoured the wiki but I still can't find the tutorial on "if" statements, so I'll just ask it here:

How do I get a script to activate only when multiple "if's" are satisfied? I want to trigger a function, for example, when a certain variable is at 1 and when two entities are inside certain script areas.

(This post was last modified: 03-30-2012, 12:08 AM by Damascus.)
03-29-2012, 07:03 AM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#2
RE: Multiple "if" statement

well the way I know is you use something like this:

if(GetLocalVarInt(jfjeb) == 1 && GetLocalVarInt(hello) == 1)
{

}

03-29-2012, 07:23 AM
Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#3
RE: Multiple "if" statement

Worked like a charm. Thanks man!

03-30-2012, 12:08 AM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#4
RE: Multiple "if" statement

You're welcome Smile

03-30-2012, 06:20 AM
Find




Users browsing this thread: 1 Guest(s)