Hello everyone,
I was studying this file (attached) . Torus dents on each impact with ground.
I want it to dent only when impulse value of it's impact with ground is more than 34. I used the following expression
if(dopfield(“/obj/dopnet1”, “torus”, “Impacts”, “Impacts”, $PT, “impulse”)>34,-0.2,0) in magnet2 translate parameters,
thinking translate parameter will be -0.2 when impulse is greater than 34 else 0.
But it is not working. The error is ‘undefined variable’ so I replaced $PT with 0, then I am not getting the desired result. What should I use instead of $PT or 0 to get the impulse value for the current impact? Is this is the problem &/or something else?
Can someone please help me out with this?
Thanks.