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


Thread Rating:
  • 4 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Anyone need help?
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
RE: Anyone need help?

(05-14-2011, 08:30 AM)Greven Wrote: Hi thear,

So i havent completely grasped the whole "if" command thingy and I wonder if you could either describe it (know it might be tiresome) or just link to a tutorial that makes sence.

Also how do i get a door to swing or bang open?

An "if" statement is when you ask the game if something is compaired to something else.

When you want to use it, you must have 3 things: An item or thing that you are using, a value or another thing, and a reason why you are using it.

Lets say this:

x = 1;
y = 2;

if (x > y) // Asks if 1 is greater than 2. Since it's not true, it moves on.
{
     x--; // This takes 1 away from x. (x = 2, now it is x = 1)
}
else if (x < y) // Asks if 1 is less than 2. It's true so it does this making y = 1.
{
     y--; // Takes 1 away from y.
}
else if (x == y) // Since they both equal 1, it does this. Making z = 2.
{
     int z = x + y;
}

This shows how it could work, but if you have a local variable instead of a variable that is limited to its function, it is more advanced.

void OnStart()
{
     SetLocalVarInt("name", 1);
     Function();
}
void Function()
{
     if (GetLocalVarInt("name") == 1)
     {
          // Something happens when it equals 1, if it doesn't, the game doesn't do anything.
     }
}

I think I know how.

Use this:

AddPropImpulse("DoorName", 1.0f, 0.0f, 0.0f, "world");

It depends on which way you want it to go. For it to open, you need to give the door a force with one of the axis. The first one is x, second, y, and the third, z. If you want the door to blast open, try a little more.

05-14-2011, 01:39 PM
Find


Messages In This Thread
Anyone need help? - by Kyle - 05-05-2011, 11:21 PM
RE: Anyone need help? - by X4anco - 05-06-2011, 05:56 PM
RE: Anyone need help? - by Khyrpa - 05-06-2011, 06:25 PM
RE: Anyone need help? - by Kyle - 05-06-2011, 07:58 PM
RE: Anyone need help? - by dragonlordsd - 05-06-2011, 08:23 PM
RE: Anyone need help? - by MrBigzy - 05-06-2011, 10:23 PM
RE: Anyone need help? - by Kyle - 05-06-2011, 11:24 PM
RE: Anyone need help? - by MrBigzy - 05-07-2011, 12:27 AM
RE: Anyone need help? - by Kyle - 05-07-2011, 12:40 AM
RE: Anyone need help? - by MrBigzy - 05-07-2011, 02:39 AM
RE: Anyone need help? - by Kyle - 05-07-2011, 02:47 AM
RE: Anyone need help? - by MrBigzy - 05-07-2011, 02:59 AM
RE: Anyone need help? - by Exostalker - 05-07-2011, 09:46 AM
RE: Anyone need help? - by Kyle - 05-07-2011, 12:38 PM
RE: Anyone need help? - by Simpanra - 05-07-2011, 01:28 PM
RE: Anyone need help? - by Kyle - 05-07-2011, 01:33 PM
RE: Anyone need help? - by Simpanra - 05-07-2011, 01:52 PM
RE: Anyone need help? - by Exostalker - 05-07-2011, 06:07 PM
RE: Anyone need help? - by Kyle - 05-07-2011, 07:31 PM
RE: Anyone need help? - by Exostalker - 05-07-2011, 07:41 PM
RE: Anyone need help? - by Kyle - 05-07-2011, 07:43 PM
RE: Anyone need help? - by Exostalker - 05-07-2011, 07:46 PM
RE: Anyone need help? - by Kyle - 05-07-2011, 07:54 PM
RE: Anyone need help? - by Dominic0904 - 05-08-2011, 07:53 PM
RE: Anyone need help? - by Simpanra - 05-08-2011, 07:58 PM
RE: Anyone need help? - by Dominic0904 - 05-08-2011, 08:55 PM
RE: Anyone need help? - by RawkBandMan - 05-08-2011, 10:40 PM
RE: Anyone need help? - by Kyle - 05-08-2011, 10:46 PM
RE: Anyone need help? - by RawkBandMan - 05-08-2011, 10:57 PM
RE: Anyone need help? - by Simpanra - 05-08-2011, 11:18 PM
RE: Anyone need help? - by Dominic0904 - 05-08-2011, 11:46 PM
RE: Anyone need help? - by Kyle - 05-08-2011, 10:59 PM
RE: Anyone need help? - by RawkBandMan - 05-08-2011, 11:11 PM
RE: Anyone need help? - by Ge15t - 05-08-2011, 11:06 PM
RE: Anyone need help? - by Kyle - 05-08-2011, 11:51 PM
RE: Anyone need help? - by Dominic0904 - 05-08-2011, 11:59 PM
RE: Anyone need help? - by Kyle - 05-09-2011, 12:04 AM
RE: Anyone need help? - by Ge15t - 05-09-2011, 12:35 AM
RE: Anyone need help? - by Kyle - 05-09-2011, 12:51 AM
RE: Anyone need help? - by Dominic0904 - 05-09-2011, 12:12 AM
RE: Anyone need help? - by Kyle - 05-09-2011, 12:14 AM
RE: Anyone need help? - by Ge15t - 05-09-2011, 02:26 AM
RE: Anyone need help? - by Kyle - 05-09-2011, 02:37 AM
RE: Anyone need help? - by Ge15t - 05-09-2011, 02:44 AM
RE: Anyone need help? - by Kyle - 05-09-2011, 03:05 AM
RE: Anyone need help? - by masken94 - 05-09-2011, 09:57 AM
RE: Anyone need help? - by Kyle - 05-09-2011, 10:52 AM
RE: Anyone need help? - by Dominic0904 - 05-09-2011, 11:01 AM
RE: Anyone need help? - by Kyle - 05-09-2011, 11:12 AM
RE: Anyone need help? - by Dominic0904 - 05-09-2011, 11:46 AM
RE: Anyone need help? - by RawkBandMan - 05-09-2011, 05:11 PM
RE: Anyone need help? - by masken94 - 05-09-2011, 06:41 PM
RE: Anyone need help? - by Kyle - 05-09-2011, 08:21 PM
RE: Anyone need help? - by Ge15t - 05-09-2011, 10:01 PM
RE: Anyone need help? - by Kyle - 05-09-2011, 10:12 PM
RE: Anyone need help? - by Ge15t - 05-10-2011, 12:08 AM
RE: Anyone need help? - by Kyle - 05-10-2011, 12:30 AM
RE: Anyone need help? - by Ge15t - 05-10-2011, 01:18 AM
RE: Anyone need help? - by Kyle - 05-10-2011, 01:26 AM
RE: Anyone need help? - by cook - 05-10-2011, 03:19 AM
RE: Anyone need help? - by Kyle - 05-10-2011, 03:36 AM
RE: Anyone need help? - by Ge15t - 05-10-2011, 05:31 AM
RE: Anyone need help? - by cook - 05-10-2011, 08:07 AM
RE: Anyone need help? - by Anxt - 05-10-2011, 04:09 AM
RE: Anyone need help? - by Kyle - 05-10-2011, 10:43 AM
RE: Anyone need help? - by Dominic0904 - 05-10-2011, 11:31 AM
RE: Anyone need help? - by csm - 05-10-2011, 06:25 AM
RE: Anyone need help? - by Kyle - 05-10-2011, 12:00 PM
RE: Anyone need help? - by Dominic0904 - 05-10-2011, 12:03 PM
RE: Anyone need help? - by Kyle - 05-10-2011, 12:14 PM
RE: Anyone need help? - by cook - 05-10-2011, 12:16 PM
RE: Anyone need help? - by Dominic0904 - 05-10-2011, 12:25 PM
RE: Anyone need help? - by Anxt - 05-10-2011, 03:36 PM
RE: Anyone need help? - by Khyrpa - 05-10-2011, 03:42 PM
RE: Anyone need help? - by Anxt - 05-10-2011, 03:44 PM
RE: Anyone need help? - by Kyle - 05-10-2011, 05:23 PM
RE: Anyone need help? - by Anxt - 05-10-2011, 06:18 PM
RE: Anyone need help? - by Kyle - 05-10-2011, 06:51 PM
RE: Anyone need help? - by Anxt - 05-10-2011, 07:02 PM
RE: Anyone need help? - by Kyle - 05-10-2011, 07:12 PM
RE: Anyone need help? - by Anxt - 05-10-2011, 07:16 PM
RE: Anyone need help? - by Kyle - 05-10-2011, 07:19 PM
RE: Anyone need help? - by Dominic0904 - 05-10-2011, 07:56 PM
RE: Anyone need help? - by Ge15t - 05-11-2011, 10:28 PM
RE: Anyone need help? - by Kyle - 05-11-2011, 10:36 PM
RE: Anyone need help? - by Simpanra - 05-11-2011, 10:42 PM
RE: Anyone need help? - by Ge15t - 05-11-2011, 10:48 PM
RE: Anyone need help? - by Simpanra - 05-11-2011, 10:51 PM
RE: Anyone need help? - by Kyle - 05-11-2011, 10:53 PM
RE: Anyone need help? - by Ge15t - 05-11-2011, 10:55 PM
RE: Anyone need help? - by Simpanra - 05-11-2011, 11:01 PM
RE: Anyone need help? - by Kyle - 05-11-2011, 10:57 PM
RE: Anyone need help? - by Ge15t - 05-12-2011, 09:46 AM
RE: Anyone need help? - by Kyle - 05-12-2011, 10:55 AM
RE: Anyone need help? - by Ge15t - 05-12-2011, 11:16 AM
RE: Anyone need help? - by Kyle - 05-12-2011, 11:21 AM
RE: Anyone need help? - by Dominic0904 - 05-12-2011, 01:10 PM
RE: Anyone need help? - by Kyle - 05-12-2011, 08:00 PM
RE: Anyone need help? - by Ge15t - 05-13-2011, 12:21 AM
RE: Anyone need help? - by Acies - 05-13-2011, 12:35 AM
RE: Anyone need help? - by Ge15t - 05-13-2011, 03:50 AM
RE: Anyone need help? - by Selyp - 05-13-2011, 05:21 AM
RE: Anyone need help? - by Kyle - 05-13-2011, 10:55 AM
RE: Anyone need help? - by Greven - 05-14-2011, 08:30 AM
RE: Anyone need help? - by Kyle - 05-14-2011, 01:39 PM
RE: Anyone need help? - by Greven - 05-14-2011, 06:35 PM
RE: Anyone need help? - by Greven - 05-14-2011, 02:41 PM
RE: Anyone need help? - by Kyle - 05-14-2011, 03:46 PM
RE: Anyone need help? - by Simpanra - 05-14-2011, 05:14 PM
RE: Anyone need help? - by Roenlond - 05-14-2011, 05:28 PM
RE: Anyone need help? - by Kyle - 05-14-2011, 06:45 PM
RE: Anyone need help? - by Simpanra - 05-14-2011, 06:47 PM
RE: Anyone need help? - by Kyle - 05-14-2011, 06:53 PM
RE: Anyone need help? - by Rownbear - 05-15-2011, 12:03 AM
RE: Anyone need help? - by nemesis567 - 05-15-2011, 12:12 AM
RE: Anyone need help? - by Kyle - 05-15-2011, 12:26 AM
RE: Anyone need help? - by nemesis567 - 05-15-2011, 12:41 AM
RE: Anyone need help? - by WatzUpzPeepz - 05-15-2011, 01:09 AM
RE: Anyone need help? - by WatzUpzPeepz - 05-15-2011, 01:02 AM
RE: Anyone need help? - by nemesis567 - 05-15-2011, 01:03 AM
RE: Anyone need help? - by nemesis567 - 05-15-2011, 01:19 AM
RE: Anyone need help? - by nemesis567 - 05-15-2011, 12:55 PM
RE: Anyone need help? - by Modular100 - 05-15-2011, 01:18 PM
RE: Anyone need help? - by nemesis567 - 05-15-2011, 03:28 PM
RE: Anyone need help? - by Dominic0904 - 05-15-2011, 03:45 PM
RE: Anyone need help? - by nemesis567 - 05-15-2011, 04:12 PM
RE: Anyone need help? - by Kyle - 05-15-2011, 04:28 PM
RE: Anyone need help? - by MrBigzy - 05-15-2011, 04:34 PM
RE: Anyone need help? - by nemesis567 - 05-15-2011, 05:12 PM
RE: Anyone need help? - by Dominic0904 - 05-15-2011, 05:45 PM
RE: Anyone need help? - by Roenlond - 05-15-2011, 05:47 PM
RE: Anyone need help? - by nemesis567 - 05-15-2011, 06:01 PM
RE: Anyone need help? - by Kyle - 05-15-2011, 05:49 PM
RE: Anyone need help? - by Roenlond - 05-15-2011, 05:52 PM
RE: Anyone need help? - by Dominic0904 - 05-15-2011, 05:50 PM
RE: Anyone need help? - by Kyle - 05-15-2011, 05:51 PM
RE: Anyone need help? - by Dominic0904 - 05-15-2011, 06:00 PM
RE: Anyone need help? - by X4anco - 05-15-2011, 07:12 PM
RE: Anyone need help? - by Kyle - 05-15-2011, 07:34 PM
RE: Anyone need help? - by nemesis567 - 05-15-2011, 07:34 PM
RE: Anyone need help? - by Rownbear - 05-16-2011, 12:04 PM
RE: Anyone need help? - by Kyle - 05-16-2011, 12:17 PM
RE: Anyone need help? - by Rownbear - 05-16-2011, 01:12 PM
RE: Anyone need help? - by DannieWest - 05-16-2011, 01:16 PM
RE: Anyone need help? - by Ge15t - 05-17-2011, 08:22 AM
RE: Anyone need help? - by Rownbear - 05-17-2011, 11:02 AM
RE: Anyone need help? - by Kyle - 05-17-2011, 11:27 AM
RE: Anyone need help? - by Rownbear - 05-17-2011, 12:08 PM
RE: Anyone need help? - by Kyle - 05-17-2011, 09:07 PM
RE: Anyone need help? - by Rownbear - 05-17-2011, 10:50 PM
RE: Anyone need help? - by nemesis567 - 05-17-2011, 11:05 PM
RE: Anyone need help? - by Kyle - 05-17-2011, 11:23 PM
RE: Anyone need help? - by nemesis567 - 05-17-2011, 11:45 PM
RE: Anyone need help? - by Kyle - 05-18-2011, 12:30 AM
RE: Anyone need help? - by nemesis567 - 05-18-2011, 02:42 PM
RE: Anyone need help? - by Sennep - 05-18-2011, 07:00 PM
RE: Anyone need help? - by Kyle - 05-18-2011, 07:58 PM
RE: Anyone need help? - by Sennep - 05-19-2011, 09:07 PM
RE: Anyone need help? - by Kyle - 05-19-2011, 09:11 PM
RE: Anyone need help? - by Wonderbread - 05-18-2011, 09:19 PM
RE: Anyone need help? - by Kyle - 05-18-2011, 09:48 PM
RE: Anyone need help? - by Wonderbread - 05-18-2011, 10:14 PM
RE: Anyone need help? - by Kyle - 05-18-2011, 11:58 PM
RE: Anyone need help? - by Wonderbread - 05-19-2011, 01:43 AM
RE: Anyone need help? - by Kyle - 05-19-2011, 02:29 AM
RE: Anyone need help? - by Wonderbread - 05-20-2011, 05:47 AM
RE: Anyone need help? - by laser50 - 05-18-2011, 10:26 PM
RE: Anyone need help? - by Sennep - 05-19-2011, 09:44 PM
RE: Anyone need help? - by DannieWest - 05-19-2011, 10:26 PM
RE: Anyone need help? - by Kyle - 05-19-2011, 10:47 PM
RE: Anyone need help? - by DannieWest - 05-19-2011, 11:10 PM
RE: Anyone need help? - by Kyle - 05-19-2011, 11:17 PM
RE: Anyone need help? - by DannieWest - 05-20-2011, 12:51 AM
RE: Anyone need help? - by Streetboat - 05-20-2011, 06:06 AM
RE: Anyone need help? - by Kyle - 05-20-2011, 10:53 AM
RE: Anyone need help? - by Streetboat - 05-20-2011, 07:01 PM
RE: Anyone need help? - by Kyle - 05-20-2011, 07:56 PM
RE: Anyone need help? - by Wonderbread - 05-20-2011, 09:04 PM
RE: Anyone need help? - by Streetboat - 05-20-2011, 08:01 PM
RE: Anyone need help? - by Kyle - 05-20-2011, 09:13 PM
RE: Anyone need help? - by RawkBandMan - 05-21-2011, 03:36 PM
RE: Anyone need help? - by Exostalker - 05-21-2011, 04:50 PM
RE: Anyone need help? - by Modular100 - 05-22-2011, 04:30 PM
RE: Anyone need help? - by Kyle - 05-22-2011, 05:05 PM
RE: Anyone need help? - by RawkBandMan - 05-23-2011, 03:05 PM
RE: Anyone need help? - by Modular100 - 05-22-2011, 05:38 PM
RE: Anyone need help? - by Kyle - 05-22-2011, 05:41 PM
RE: Anyone need help? - by xtron - 05-22-2011, 06:00 PM
RE: Anyone need help? - by Kyle - 05-22-2011, 06:41 PM
RE: Anyone need help? - by xtron - 05-22-2011, 07:26 PM
RE: Anyone need help? - by Kyle - 05-22-2011, 07:33 PM
RE: Anyone need help? - by xtron - 05-22-2011, 07:34 PM
RE: Anyone need help? - by Kyle - 05-22-2011, 07:37 PM
RE: Anyone need help? - by xtron - 05-22-2011, 07:39 PM
RE: Anyone need help? - by Kyle - 05-22-2011, 07:44 PM
RE: Anyone need help? - by xtron - 05-22-2011, 07:47 PM
RE: Anyone need help? - by Kyle - 05-22-2011, 07:54 PM
RE: Anyone need help? - by xtron - 05-22-2011, 07:54 PM
RE: Anyone need help? - by Kyle - 05-22-2011, 08:03 PM
RE: Anyone need help? - by xtron - 05-22-2011, 08:07 PM
RE: Anyone need help? - by Kyle - 05-22-2011, 08:10 PM
RE: Anyone need help? - by xtron - 05-22-2011, 08:12 PM
RE: Anyone need help? - by Kyle - 05-22-2011, 08:47 PM
RE: Anyone need help? - by xtron - 05-22-2011, 08:49 PM
RE: Anyone need help? - by Kyle - 05-22-2011, 09:16 PM
RE: Anyone need help? - by xtron - 05-23-2011, 02:42 PM
RE: Anyone need help? - by xtron - 05-23-2011, 05:41 PM
RE: Anyone need help? - by WatzUpzPeepz - 05-23-2011, 07:45 PM
RE: Anyone need help? - by RawkBandMan - 05-23-2011, 07:48 PM
RE: Anyone need help? - by Simpanra - 05-23-2011, 08:08 PM
RE: Anyone need help? - by Kyle - 05-23-2011, 09:14 PM
RE: Anyone need help? - by xtron - 05-23-2011, 08:32 PM
RE: Anyone need help? - by Simpanra - 05-23-2011, 09:45 PM
RE: Anyone need help? - by xtron - 05-24-2011, 06:39 AM
RE: Anyone need help? - by havis1337 - 05-24-2011, 08:50 PM
RE: Anyone need help? - by DannieWest - 05-24-2011, 08:58 PM
RE: Anyone need help? - by Mooserider - 05-26-2011, 08:26 AM
RE: Anyone need help? - by Kyle - 05-26-2011, 11:00 AM
RE: Anyone need help? - by Mooserider - 05-26-2011, 11:38 AM
RE: Anyone need help? - by Kyle - 05-28-2011, 01:41 PM



Users browsing this thread: 9 Guest(s)