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
StaticPhysics off not working
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#1
StaticPhysics off not working

Okay, holy crap this problem is driving me insane, as I can see no problems with my script. I've placed a chair in my map that I've called "fall_object_1." (Yes, I've double checked) This is my script:

PHP Code: (Select All)
void OnStart()
{
    
SetPropStaticPhysics("fall_object_1"true);
    
SetEntityPlayerInteractCallback("fall_object_1""FallObject"true);
}

void FallObject(string &in asEntity)
{
    
SetMessage("Doors""inside"0);
    
SetPropStaticPhysics("fall_object_1"false);


The message shows on the screen when I interact with the chair, but though the chair's static physics turn on when the map is started, it doesn't turn off when I interact with the chair.

12-15-2012, 03:18 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: StaticPhysics off not working

Try:

void OnStart()
{
SetPropStaticPhysics("fall_object_1", true);
SetEntityCallbackFunc("fall_object_1", "FallObject";
}

void FallObject(string &in asEntity, string &in asType)
{
SetMessage("Doors", "inside", 0);
SetPropStaticPhysics("fall_object_1", false);
}

Your problem is really weird, Damascus-Try to put "true" another time instead "false".

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
(This post was last modified: 12-15-2012, 04:17 PM by The chaser.)
12-15-2012, 04:12 PM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#3
RE: StaticPhysics off not working

That is really weird. If I remember correctly, there's an option in the level editor to turn StaticPhysics on and off. You could try that.

In Ruins [WIP]
12-17-2012, 04:08 AM
Find




Users browsing this thread: 3 Guest(s)