in progress
We can simulate the action of wind over curtains by using the plastic curtain from AMFP and the force function.
1. Get the files LINK
You need a modified version of the curtains that better respond to force.
You can create your own version or just use the ones I already did in my mod.
Note: If you want to create your own version, make sure its bodies respond properly to force
and behave correctly when moving, no lag, no weird things. Also remove collision with player.
2. Place the curtains.
Put the curtains wherever you want but not touching the wall or each other.
Then resize its width all you want, remember the model is initially thin.
3. Write the code.
The code below starts a loop function that randomly pushes the curtains and plays the wind sound.
Open your script file and add the following line inside your OnStart() function:
WindLoop ( "" );
Now copy&paste this other function and it's ready.
void WindLoop ( string &in rabbit ) { AddPropImpulse ( "Curtain_1", 2, 0.5, 0, "Local" ); PlaySoundAtEntity ( "", "TR_spooky_wind_whirl.snt", "Curtain_1", 0, false ); AddTimer ( "", RandFloat (3,5), " WindLoop " ); }
j