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


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make entities fall?
Author Message
Artsy Offline
Member

Posts: 220
Joined: Feb 2014
Reputation: 9
Post: #1
How to make entities fall?

Basically what I'm trying to do is get a statue to fall. I've tried this:

PHP Code: (Select All)
void OnStart(){
    
//Timers
    
{    
        
AddTimer("StatueFall_timer"0.8f"StatueFall");
    }
}

    
void StatueFall(string &in asTimer){
    {
        
SetEntityActive("CrudeManChainsInit"false);
        
SetEntityActive("CrudeManChainsFall"true);
    }


and for some reason both of them are still active entities (CrudeManChainsFall is floating in mid air while CrudeManChainsInit is still active). How do I make that to fall down and not float in mid air while the normal one just disappears? I've got Static Physics enabled too.
04-18-2014 02:07 PM
Find all posts by this user Quote this message in a reply
PutraenusAlivius Offline
Posting Freak

Posts: 4,712
Joined: Dec 2012
Reputation: 119
Post: #2
RE: How to make entities fall?

You can't. The CrudeMan is a staticprop, and thus it cannot be de-activated and it'll always static, hence the name.

Here are some solution:

SOLUTION
Spoiler below!

1) Open up the entity file in the Model Editor
2) Go to Settings > User Defined Variables
3) Change the type from StaticProp to Object (Subtype Slide)
4) Adjust the settings as you want.
5) Save it in some other location (Probably in your CS folder, don't want to change the original, that'll cause some problems)
6) Enjoy!


"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 04-18-2014 02:19 PM by PutraenusAlivius.)
04-18-2014 02:17 PM
Find all posts by this user Quote this message in a reply
Artsy Offline
Member

Posts: 220
Joined: Feb 2014
Reputation: 9
Post: #3
RE: How to make entities fall?

When I opened it and went to User Defined Variables, it was already like this:
Type: Objects
Subtype: Static
04-18-2014 02:30 PM
Find all posts by this user Quote this message in a reply
Romulator Offline
G'day mate! :3

Posts: 3,459
Joined: Jan 2013
Reputation: 191
Post: #4
RE: How to make entities fall?

Quote:I've got Static Physics enabled too.

Static Physics means it has no mass, therefore no gravity, which means no force. Therefore, they won't move. Perhaps this is your problem?

Discord: Romulator#4942
04-18-2014 02:32 PM
Find all posts by this user Quote this message in a reply
PutraenusAlivius Offline
Posting Freak

Posts: 4,712
Joined: Dec 2012
Reputation: 119
Post: #5
RE: How to make entities fall?

(04-18-2014 02:30 PM)artsyracoon Wrote:  When I opened it and went to User Defined Variables, it was already like this:
Type: Objects
Subtype: Static

Don't enable Static Physics. It'll make it Static.

"Veni, vidi, vici."
"I came, I saw, I conquered."
04-18-2014 02:33 PM
Find all posts by this user Quote this message in a reply
Artsy Offline
Member

Posts: 220
Joined: Feb 2014
Reputation: 9
Post: #6
RE: How to make entities fall?

I disabled Static Physics on both and still:

Edit: CrudeManChainsInit inactive now as I just noticed the typo in the Level Editor. That's working. The other one is still floating though. And sorry for the chaos.


Attached File(s)
.jpg  image.jpg (Size: 366.03 KB / Downloads: 30)
(This post was last modified: 04-18-2014 02:49 PM by Artsy.)
04-18-2014 02:38 PM
Find all posts by this user Quote this message in a reply
Mudbill Offline
Posting Freak

Posts: 3,527
Joined: Apr 2013
Reputation: 166
Post: #7
RE: How to make entities fall?

Even if you set an entity to no longer be static, they still need a mass to their body in order to have gravity. Open the model in the model editor, and if you select the collision box (body) of the entity, you can choose what mass it should have. Also make sure "Has Gravity" is checked at the bottom.

04-18-2014 07:00 PM
Find all posts by this user Quote this message in a reply
Artsy Offline
Member

Posts: 220
Joined: Feb 2014
Reputation: 9
Post: #8
RE: How to make entities fall?

THANK YOU.
But is there like a way to disable COMPLETE interaction with the entity when it falls?
I mean I can't touch it but I can move it just by walking by it. I set the entity's body mass to 1 btw. Not sure if that's right.

Edit: Never mind, forgot to uncheck Pushed by character gravity.
Edit 2: Had some problems with it as I even got out of the map because the force was so big. Fixed it by setting the entity's body mass to 20. All is good. No problems. Big Grin
(This post was last modified: 04-18-2014 08:41 PM by Artsy.)
04-18-2014 07:46 PM
Find all posts by this user Quote this message in a reply
Mudbill Offline
Posting Freak

Posts: 3,527
Joined: Apr 2013
Reputation: 166
Post: #9
RE: How to make entities fall?

Yeah, mass around 1 and less is quite easily bugged in the engine. 20 is a good number for something of that size.

04-19-2014 01:05 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)