Frictional Games Forum (read-only)
Making entities swing back and forth. - 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: Making entities swing back and forth. (/thread-10382.html)



Making entities swing back and forth. - Promethium - 09-18-2011

Hey, so what I want is for my lamp type "hanging_lantern_wall" to rock back and forth, like wind is pushing it, or that something has pushed it and it sways. Is there a way to do this? I remember being in the storage in the main game and there was a rope swinging. Help much appreciated, thanks ^-^


RE: Making entities swing back and forth. - Your Computer - 09-18-2011

AddPropForce() should do the trick.


RE: Making entities swing back and forth. - Promethium - 09-18-2011

(09-18-2011, 11:13 AM)Your Computer Wrote: AddPropForce() should do the trick.
Thankyou Big Grin but that will only push it once, is there a way to repeat it? Because my lanterns just swinging then stopping


RE: Making entities swing back and forth. - Your Computer - 09-18-2011

(09-18-2011, 08:09 PM)Promethium Wrote: Thankyou Big Grin but that will only push it once, is there a way to repeat it? Because my lanterns just swinging then stopping

Make sure the entity has gravity enabled. It may also have to do with the type of joint the entity has. In either case, you may need to modify the entity in the model editor.


RE: Making entities swing back and forth. - Promethium - 09-18-2011

(09-18-2011, 08:15 PM)Your Computer Wrote:
(09-18-2011, 08:09 PM)Promethium Wrote: Thankyou Big Grin but that will only push it once, is there a way to repeat it? Because my lanterns just swinging then stopping

Make sure the entity has gravity enabled. It may also have to do with the type of joint the entity has. In either case, you may need to modify the entity in the model editor.
Ahhh, will try it out now =) thanks for the help and your time ^-^