View unanswered posts | View active topics It is currently Sat Dec 28, 2024 5:00 pm



Reply to topic  [ 7 posts ] 
 How to make an MOSRotating never become terrain? 
Author Message
User avatar

Joined: Fri Jan 26, 2007 8:27 pm
Posts: 40
Location: England
Reply with quote
Post 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!


Tue Jan 17, 2012 1:41 am
Profile
User avatar

Joined: Fri Apr 30, 2010 2:12 pm
Posts: 560
Reply with quote
Post 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.


Tue Jan 17, 2012 7:15 am
Profile
DRL Developer
DRL Developer

Joined: Tue Aug 11, 2009 5:09 am
Posts: 395
Reply with quote
Post 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.


Last edited by Abdul Alhazred on Wed Jan 18, 2012 1:11 pm, edited 1 time in total.



Tue Jan 17, 2012 9:39 am
Profile
User avatar

Joined: Fri Jan 26, 2007 8:27 pm
Posts: 40
Location: England
Reply with quote
Post 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?


Tue Jan 17, 2012 9:51 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post 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.


Tue Jan 17, 2012 6:01 pm
Profile
User avatar

Joined: Fri Jan 26, 2007 8:27 pm
Posts: 40
Location: England
Reply with quote
Post 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.


Tue Jan 17, 2012 8:35 pm
Profile
DRL Developer
DRL Developer

Joined: Tue Aug 11, 2009 5:09 am
Posts: 395
Reply with quote
Post 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.


Tue Jan 17, 2012 8:42 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: Google [Bot]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.039s | 14 Queries | GZIP : Off ]