[SCRIPT] Static physics for carried entity - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: [SCRIPT] Static physics for carried entity (/thread-18824.html) |
Static physics for carried entity - craven7 - 10-17-2012 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 RE: Static physics for carried entity - The chaser - 10-17-2012 Tick static physics in the entity tab. That should work. RE: Static physics for carried entity - craven7 - 10-17-2012 Thx, but I want to disable physics ingame with a script, while the player is carrying the object. RE: Static physics for carried entity - The chaser - 10-17-2012 Please, tell me the exact situation. What should be static? And how would be the process? Touching an area? RE: Static physics for carried entity - craven7 - 10-17-2012 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 RE: Static physics for carried entity - The chaser - 10-17-2012 Off-topic: My other post was my 300! Yay Topic: Then you could use sticky areas, because I think you want to put a sort of orb in a pedestal, right? 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. RE: Static physics for carried entity - craven7 - 10-17-2012 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. RE: Static physics for carried entity - The chaser - 10-17-2012 Well, is "AttachableBodyName". There, put the name of the entity. When the body part touches it (how sweet! ) it will move to the immediate center of the area. You can also modify how is the body moved, what rotation, etc. RE: Static physics for carried entity - craven7 - 10-17-2012 Thanks, I don't have time to do it now, I'll try tomorrow. thank you. RE: Static physics for carried entity - The chaser - 10-17-2012 We are here to help |