Message 1 of 3
How to force MassFX simulation to finish before next line in MaxScript is executed

Not applicable
09-26-2021
04:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In 3ds MaxScript 2020 (run on Win 10) I have a loop
for i=1 to 50 do
(
-- do something A
PxRunSimulation()
-- do something B(i)
macros.run "PhysX" "PxResetSimMS"
)
Unfortunately, B is executed before simulation ends. How to prevent it? I mean, how to force B to wait until simul is finished? I tried this
while PxIsSimulationRunning(true) do ( )
but Autodesk freezes. I'm 2 weeks beginner of 3ds so please be forgiving (=extra clear) in your answer. Thx