Data Realms Fan Forums
http://45.55.195.193/

How to make an MOSRotating never become terrain?
http://45.55.195.193/viewtopic.php?f=1&t=29551
Page 1 of 1

Author:  Entropy [ Tue Jan 17, 2012 1:41 am ]
Post subject:  How to make an MOSRotating never become terrain?

Greetings all.

I'm making a dropship bomb with a delayed fuze, such that it turns into a Lua'd MOSRotating when released (because of reasons) and then sinks into the ground to explode after a short delay. I've got this part all figured out and it works well.

There is a problem however, and that is the MOSRotating has a habit of settling and becoming terrain when it lands - I'd say it does this about one time in five. Currently the MOSRotating is a bomb-shaped item which weighs 2000kg to make it sink through terrain, and is made of bullet metal. I have tried ice as well due to its low friction and stickiness coefficients but it made little difference.

I have also tried setting the RestThreshhold to enormous positive and negative numbers, which makes it settle less often, but it does not solve the problem. It is also not allowed to apply ToSettle = False to an MOSRotating which I believe would be the ideal solution.

What could I do to this object to force it never to settle? Thanks!

Author:  Naxete [ Tue Jan 17, 2012 7:15 am ]
Post subject:  Re: How to make an MOSRotating never become terrain?

If I remember correctly, the light tanks of my metal slug mod
did exactly that, left the cannon balls around the battlefield
without letting them become terrain, MOSRotatings I think.

Author:  Abdul Alhazred [ Tue Jan 17, 2012 9:39 am ]
Post subject:  Re: How to make an MOSRotating never become terrain?

I think you can use an activated TDExplosive instead of a MOSRotating, but I haven't tried it myself. If that does not work you can set MissionCritical = 1 in the ini, and it will stick around forever. But then you have to delete it manually with Lua, using self.ToDelete = true.


Edit: I just learned that a particle is forced to settle if its angular velocity change sign three frames in a row (e.g. AngularVel goes from 1 to -1 to 1 and then to -1 again). Data told me he changed it so this should not happen in B27 if the RestThreshold is negative. This means that using a TDExplosive most likely does not solve the problem, but we can probably avoid it altogether by manually adjusting the AngularVel with Lua.

Author:  Entropy [ Tue Jan 17, 2012 9:51 am ]
Post subject:  Re: How to make an MOSRotating never become terrain?

I'll make them mission-critical.

They explode after one second anyway, but sometimes they were settling even before this short time. Thanks Abdul.

Edit: Making them mission critical prevents the Lua from exploding the bombs! That's no good. Is there anything else I can do to them?

Author:  Asklar [ Tue Jan 17, 2012 6:01 pm ]
Post subject:  Re: How to make an MOSRotating never become terrain?

You can try a bigger work-around, like making the MOSRotating spawn the explosive with lua, and then deleting the 2000kg MOSRotating.

But there might be a simpler way.

Author:  Entropy [ Tue Jan 17, 2012 8:35 pm ]
Post subject:  Re: How to make an MOSRotating never become terrain?

Yeah, and one of the other annoying things is I'd like to do it without TDExplosives, as they have ugly nametags.

Author:  Abdul Alhazred [ Tue Jan 17, 2012 8:42 pm ]
Post subject:  Re: How to make an MOSRotating never become terrain?

Entropy wrote:
Making them mission critical prevents the Lua from exploding the bombs! That's no good. Is there anything else I can do to them?
Thats what I meant by "you have to delete it manually with Lua, using self.ToDelete = true". I would do it like Asklar said, and spawn the explosion with Lua at the same time as you delete the bomb.

Entropy wrote:
Yeah, and one of the other annoying things is I'd like to do it without TDExplosives, as they have ugly nametags.
Again, use an activated TDExplosive. The label is removed after activation. I would do it like Asklar said, and spawn the explosion with Lua at the same time as you delete the bomb.


Edit: I just learned that a particle is forced to settle if its angular velocity change sign three frames in a row (e.g. AngularVel goes from 1 to -1 to 1 and then to -1 again). Data told me he changed it so this should not happen in B27 if the RestThreshold is negative. This means that using a TDExplosive most likely does not solve the problem, but we can probably avoid it altogether by manually adjusting the AngularVel with Lua.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/