Frictional Games Forum (read-only)

Full Version: Static physics for carried entity
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

does anybody know how it's possibly to set an entity which is carried around by the player to static physics mode?

It seems that SetPropStaticPhysics() is only working when the player isn't carrying the entity. Or maybe there is another way to fixate an entity if a player moves it into a script area?


Thanks
Tick static physics in the entity tab. That should work.
Thx, but I want to disable physics ingame with a script, while the player is carrying the object.
Please, tell me the exact situation. What should be static? And how would be the process? Touching an area?
The player is carrying an entity around by clicking and holding left mouse button. If the entity collides with a script area, physics for the entity should be disabled, therefore the player can't carry it anymore and it remains at the position.

Everything is working fine in my script except disabling the physic for the entity. I checked the functionality by using SetEntityActive() and it worked, means that I carried the entity in the area and it disappeared. This was only for testing purposes however, I don't want it to disappear, I want it to remain in the area.

So the only problem is, that apparantly you can't set disable physics for an entity while it is beeing carried around.

Oh and thanks for your quick answers Smile
Off-topic: My other post was my 300! Yay Big Grin

Topic: Then you could use sticky areas, because I think you want to put a sort of orb in a pedestal, right? Wink

Make a sticky area, and put the necessary names. When the entity collides with the sticky (if the sticky has the name of the entity in the Allow attach or something like that) the entity will move by itself to the center of the sticky area.
Lol, nope, no orb... actually some body parts^^

Oh... didn't know about sticky areas, will look at them... what a shame xD I already coded everything and it is working if you throw the entity in the area or let it drop in the area.
Well, is "AttachableBodyName". There, put the name of the entity. When the body part touches it (how sweet! Angel) it will move to the immediate center of the area.
You can also modify how is the body moved, what rotation, etc.
Thanks, I don't have time to do it now, I'll try tomorrow.

thank you.
We are here to help Wink