Frictional Games Forum (read-only)
How To make something Levitate ? - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: How To make something Levitate ? (/thread-4549.html)

Pages: 1 2


How To make something Levitate ? - Alroc - 09-18-2010

Hi I was wondering how to make an object like chair flying slowly in the air like levitating

but the only result I have is making something flying By an impulse
...


RE: How To make something Levitate ? - Pandemoneus - 09-19-2010

I am actually interested in that too. I only saw Entih being able to levitate the player in his video on YouTube, maybe he sees this thread and will answer.

His thread: http://www.frictionalgames.com/forum/thread-4464.html
His video: http://www.youtube.com/watch?v=rPNN2OaX0oQ


RE: How To make something Levitate ? - gosseyn - 09-19-2010

I want to be able to manipulate position, rotation, and scale of entities via scripting, simple !


RE: How To make something Levitate ? - MulleDK19 - 09-19-2010

(09-18-2010, 11:57 PM)Alroc Wrote: Hi I was wondering how to make an object like chair flying slowly in the air like levitating

but the only result I have is making something flying By an impulse
...

Use AddPropForce in a timer (that runs maybe 50-100 times a second) instead... Then just find the amount of force required to just make the chair lift off the ground.


RE: How To make something Levitate ? - Alroc - 09-19-2010

Isnt't there a less tricky method like a SetPos Or SetRot ?


RE: How To make something Levitate ? - MulleDK19 - 09-19-2010

(09-19-2010, 01:08 AM)Alroc Wrote: Isnt't there a less tricky method like a SetPos Or SetRot ?

No.


RE: How To make something Levitate ? - Alroc - 09-19-2010

So sad Sad ...


RE: How To make something Levitate ? - nofsky - 09-19-2010

If you edit an object in the ModelEditor you can turn off gravity on it so that it floats in the air. Then you can use scripting to push it a little bit in different directions. That's probably your best bet.


RE: How To make something Levitate ? - gosseyn - 09-19-2010

that is a good idea nofsky, i am trying that right now and it is the closest i found to what i am trying to achieve, thanks!

edit : i found a semi-solution, i play with gravity, impulses and block boxes that are blocking everything but the player. But i still have problems making a good loop with impusles, i try something like :

Code:
while (1)
     {
          AddTimer("", 1.0f, "LevitateUp");
          AddTimer("", 2.0f, "LevitateDown");
     }

void LevitateUp(string &in asTimer)
     {
          AddPropImpulse("MyChair", 0.0, 1, 0.0, "world");
     }

void LevitateDown(string &in asTimer)
     {
          AddPropImpulse("MyChair", 0.0, -1, 0.0, "world");
     }

I know my while loop is an infinite loop, and it is making the game crash, but i think maybe i don't know where to place it. I want the levitating effect to start as soon as the player enters the level. Any input? Thanks.


RE: How To make something Levitate ? - gosseyn - 09-19-2010

please anyone can help with creating a loop that will give a levitating effect on an object?
The object is already standing in the air, i just need to give it a nifty effect of vibrating.Thanks!