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


Thread Rating:
  • 5 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Looking For Help? Look No More!
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#15
RE: Looking For Help? Look No More!

(08-29-2011, 11:53 AM)Saffire192 Wrote: Hi Kyle

ive been toying around with if statements and ive made a door open.

void StateChange(string &in EntityName, int alState)
{
if(alState == -1){
SetMoveObjectState("safety_normal_vert_1", 0.1);
}
if(alState != -1){
SetMoveObjectState("safety_normal_vert_1", 0.0);
}
}

it works but the door moves straight back to its original position, why is this?

If you don't want that to happen, have it set with static physics once it completely opens.

void StateChange(string &in EntityName, int alState)
{
     if(alState == -1){
          SetMoveObjectState("safety_normal_vert_1", 0.1);
     }
     if(alState != -1){
          SetMoveObjectState("safety_normal_vert_1", 0.0);
          SetStaticPhysics("safety_normal_vert_1", true);
     }
}

This should work, unless I messed up the alStates. Tongue

08-29-2011, 12:51 PM
Find


Messages In This Thread
Looking For Help? Look No More! - by Kyle - 08-28-2011, 03:35 PM
RE: Looking For Help? Look No More! - by Kyle - 08-28-2011, 03:51 PM
RE: Looking For Help? Look No More! - by Kyle - 08-28-2011, 04:19 PM
RE: Looking For Help? Look No More! - by Elven - 08-28-2011, 07:42 PM
RE: Looking For Help? Look No More! - by Elven - 08-28-2011, 08:21 PM
RE: Looking For Help? Look No More! - by Legato - 08-28-2011, 10:42 PM
RE: Looking For Help? Look No More! - by Legato - 08-29-2011, 12:54 AM
RE: Looking For Help? Look No More! - by Kyle - 08-29-2011, 12:51 PM
RE: Looking For Help? Look No More! - by rybray - 08-29-2011, 05:18 PM
RE: Looking For Help? Look No More! - by Kyle - 08-29-2011, 05:54 PM
RE: Looking For Help? Look No More! - by rybray - 08-29-2011, 06:11 PM
RE: Looking For Help? Look No More! - by Kyle - 08-29-2011, 06:19 PM
RE: Looking For Help? Look No More! - by Kyle - 08-29-2011, 06:33 PM
RE: Looking For Help? Look No More! - by ZRPT - 08-29-2011, 06:41 PM
RE: Looking For Help? Look No More! - by Kyle - 08-29-2011, 07:33 PM
RE: Looking For Help? Look No More! - by Kyle - 08-29-2011, 08:29 PM
RE: Looking For Help? Look No More! - by zeravia - 08-29-2011, 09:15 PM
RE: Looking For Help? Look No More! - by DRedshot - 08-30-2011, 12:42 PM
RE: Looking For Help? Look No More! - by Kyle - 08-30-2011, 12:47 PM
RE: Looking For Help? Look No More! - by DRedshot - 08-30-2011, 12:59 PM
RE: Looking For Help? Look No More! - by Elven - 08-30-2011, 02:46 PM
RE: Looking For Help? Look No More! - by Kyle - 08-30-2011, 03:43 PM
RE: Looking For Help? Look No More! - by Elven - 08-30-2011, 03:45 PM
RE: Looking For Help? Look No More! - by Kyle - 08-30-2011, 04:22 PM
RE: Looking For Help? Look No More! - by Elven - 08-30-2011, 04:38 PM
RE: Looking For Help? Look No More! - by ZRPT1 - 08-30-2011, 05:23 PM
RE: Looking For Help? Look No More! - by Kyle - 08-30-2011, 05:31 PM
RE: Looking For Help? Look No More! - by ZRPT1 - 08-30-2011, 05:34 PM
RE: Looking For Help? Look No More! - by Kyle - 08-30-2011, 06:14 PM
RE: Looking For Help? Look No More! - by ZRPT1 - 08-30-2011, 06:24 PM
RE: Looking For Help? Look No More! - by Kyle - 08-31-2011, 03:13 AM
RE: Looking For Help? Look No More! - by xiphirx - 08-31-2011, 03:46 AM
RE: Looking For Help? Look No More! - by xiphirx - 08-31-2011, 04:06 AM
RE: Looking For Help? Look No More! - by xiphirx - 08-31-2011, 05:04 AM
RE: Looking For Help? Look No More! - by DRedshot - 08-31-2011, 11:58 AM
RE: Looking For Help? Look No More! - by TheBaker - 09-01-2011, 06:39 PM
RE: Looking For Help? Look No More! - by rybray - 09-03-2011, 03:01 PM
RE: Looking For Help? Look No More! - by Selyp - 09-04-2011, 12:45 AM
RE: Looking For Help? Look No More! - by rybray - 09-04-2011, 06:07 PM
RE: Looking For Help? Look No More! - by Kyle - 09-05-2011, 12:45 PM
RE: Looking For Help? Look No More! - by Kyle - 09-05-2011, 07:04 PM
RE: Looking For Help? Look No More! - by xiphirx - 09-06-2011, 03:28 AM
RE: Looking For Help? Look No More! - by JMFStorm - 09-07-2011, 05:23 AM
RE: Looking For Help? Look No More! - by DRedshot - 09-15-2011, 03:12 PM
RE: Looking For Help? Look No More! - by DRedshot - 09-16-2011, 10:51 AM
RE: Looking For Help? Look No More! - by Bearscar - 09-16-2011, 10:57 AM
RE: Looking For Help? Look No More! - by Kyle - 09-16-2011, 11:05 AM
RE: Looking For Help? Look No More! - by Bearscar - 09-16-2011, 11:24 AM
RE: Looking For Help? Look No More! - by Leu Radu - 09-16-2011, 09:22 PM
RE: Looking For Help? Look No More! - by Dilzilla - 09-16-2011, 11:56 PM
RE: Looking For Help? Look No More! - by Kman - 09-17-2011, 05:49 AM
RE: Looking For Help? Look No More! - by Elven - 09-17-2011, 09:35 PM
RE: Looking For Help? Look No More! - by Elven - 09-17-2011, 11:50 PM



Users browsing this thread: 11 Guest(s)