Jump to content
Sign in to follow this  
miles teg

Anti-mine rollers????

Recommended Posts

Hi. Right now I'm working on a IDF Puma CEV however the problem is that I lack the skills to create a working anti-mine system. I have some ideas of how one might work, but lack the skills for working out the details in the scripting and addon design.

I think it would SUPER AWESOME if someone could design a mine roller MLOD model and some scripts that could be easily added to different tanks by any addon maker.

Obviously the dammage model used in the OFP game engine does not permit a tank to have different armor levels for specific sections of the tank. The idea I had was to have an invisible tank scripted to be attached to the front of the CEV tank similar to the towing script but in reverse if that is possible. The tricky part that I can't figure out is how to get the invisible tank (with a super high armor level) to stay in front of the CEV. so that it detonates landmines in front of the CEV tank. Anyone have any clue on how to do this???

Perhaps just make the invisible tank a big invisible square with no collision model so that it can be centered in the middle of the CEV tank so that it covers an area of a few feet around the tank.

Does anyone think they can do this???

Does anyone have any better ideas???

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites
...The idea I had was to have an invisible tank scripted to be attached to the front of the CEV tank similar to the towing script but in reverse if that is possible.  The tricky part that I can't figure out is how to get the invisible tank (with a super high armor level) to stay in front of the CEV. so that it detonates landmines in front of the CEV tank.  Anyone have any clue on how to do this???

Yep, using trigonometry you can easily setpos something continually infront of the tank, I made a similar script a while ago...<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;setpos.sqs by Korax - used to make things stay infront of something else

_unit = _this select 0

_unit2 = _this select 1

_dist = 5

;;;;^^^distance infront of vehicle

#loop

_Xpos = (getpos _unit select 0)+(sin (getdir _unit)*_dist)

_Ypos = (getpos _unit select 1)+(cos (getdir _unit)*_dist)

_unit2 setpos [_Xpos,_Ypos,(getpos _unit select 2)]

_unit2 setdir getdir _unit

?! alive _unit : Exit

~0.01

goto "loop"

edit: Or if you want a different method, you can use NearestObject to detect the mine and delete it with some sort of effect...

Share this post


Link to post
Share on other sites
...The idea I had was to have an invisible tank scripted to be attached to the front of the CEV tank similar to the towing script but in reverse if that is possible.  The tricky part that I can't figure out is how to get the invisible tank (with a super high armor level) to stay in front of the CEV. so that it detonates landmines in front of the CEV tank.  Anyone have any clue on how to do this???

Yep, using trigonometry you can easily setpos something continually infront of the tank, I made a similar script a while ago...<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;setpos.sqs by Korax - used to make things stay infront of something else

_unit = _this select 0

_unit2 = _this select 1

_dist = 5

;;;;^^^distance infront of vehicle

#loop

_Xpos = (getpos _unit select 0)+(sin (getdir _unit)*_dist)

_Ypos = (getpos _unit select 1)+(cos (getdir _unit)*_dist)

_unit2 setpos [_Xpos,_Ypos,(getpos _unit select 2)]

_unit2 setdir getdir _unit

?! alive _unit : Exit

~0.01

goto "loop"

edit: Or if you want a different method, you can use NearestObject to detect the mine and delete it with some sort of effect...

Awesome! Thanks. What would be an example script to put into the init box of the CEV vehicle to activate that script you show?

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites

miles you just need to copy that code into notepad then save as setpos.sqs. then you put like "this exec setpos.sqs"

something like that. well it would actual be liek a trigger [roller,tank] exec setpos.sqs

something like that

Share this post


Link to post
Share on other sites

Cool. Thx. I figured it was something like that. But I couldn't remember where the [] go and stuff like that.

I'll mess around with that...now I gotta see if I can find the class name for the BIS invisible tank...and if that doesn't work then I guess I'll try making that invisible tank class object.

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites

or just used the rollers in that pack.

they would work. if you need i can whip out a config lines for it.

Share this post


Link to post
Share on other sites

Yeah that would kick ass if you could do that.  smile_o.gif

If you got it to work you'd be the first in OFP to make working anti-mine rollers! smile_o.gif

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites

Below is a pic of me and Calm_Terror have created so far regarding the Mine rollers.   The only problem we are having now is creating the .cpp for the rollers that will allow the rollers to actually roll and to set off the landmines.

Basically we are having trouble making it a "tank" class object that will detonate the landmines and that will animate the roller wheels when the tank it's attached to starts to move.  

The Puma APC and the rollers in the pic are two seperate objects/.pbo files. They are attached via the script posted earlier in this thread. So basically the wheels need to roll when the speed the Puma moves....and it needs to be detonate the landmines...which I assume means that it must be a tank class object.

Does anyone here know how to make a config.cpp file that will allow that???   If so please PM me and I will send you the rollers to work on and of coarse give you credit when they are released as part of a IDF beta tank pack.

LoBoMineRoller1.jpg

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites

wow looks good.

you texture them already?

i think i should have made the roller wheels a little larger..

Share this post


Link to post
Share on other sites

You could try doing something like this

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;setpos.sqs by Korax - used to make things stay infront of something else

_unit = _this select 0

_unit2 = _this select 1

_dist = 5

;;;;^^^distance infront of vehicle

#loop

_mine = nearestobject [_unit2,"Mine"]

?!isnull _mine : _mine2 = _mine

?_unit2 distance _mine2 <2 : deletevehicle _mine; deletevehicle _mine2;_boom = "shell120" camcreate getpos _unit2

_Xpos = (getpos _unit select 0)+(sin (getdir _unit)*_dist)

_Ypos = (getpos _unit select 1)+(cos (getdir _unit)*_dist)

_unit2 setpos [_Xpos,_Ypos,(getpos _unit select 2)]

_unit2 setdir getdir _unit

?! alive _unit : Exit

~0.01

goto "loop"

Edit: (rereads) oh you say it works, neat biggrin_o.gif

Share this post


Link to post
Share on other sites

More updates!

Good news folks. Calm_Terror, Korax, and myself have managed to create a working anti-mine roller system.

It's not perfect but it blows up at least a few land mines without destroying the tank.

We are currently sorting out bugs such as weight issues with the rollers and creating a disattach script for it so that when their is an option on the action menu to remove the rollers and also so that when the tank is destroyed the rollers automatically come off. Othewise they sit there and bounce around alot.

But the rollers roll and the attachment script by Korax works well except in MP games (but most such attachment scripts don't work well in MP games so there's not a lot we can do about that unless someone comes up with some clever ideas to deal with sync issues).

At any rate, once we finish up fixing up the last of the bugs, the rollers (which are crude due to my newbie modelling efforts) will be released to the public and all mods are free to use and modify them as long as the credit is given to at least Calm_Terror and Korax who did most of the work on this.

Also I would ask that any modifications of these rollers be kept unbinarized so that improved versions of the mine rollers can be shared with the OFP community.

Anyhoo... Here's some pics of the mine rollers in action:

LoBoMineRoller2.jpg

LoBoMineRoller3.jpg

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites

It would be cool to have some of the other clearing tecniques simulated:

Mine flail:

This is a machinery that throws mines away, smashes them or just makes them detonate. http://www.xtest.dk/hydrema....de=B107

This might be done with your script and a different vehicle model.

http://www.fas.org/man/dod-101/sys/land/grizzly.htm

A dozer blade:

Throws the mines to the side or explodes them in front of the vehicle.

A line charge:

This is a rocket launced explosive charge that clears a path by blowing the mines away.

http://www.fas.org/man/dod-101/sys/land/m60-avlm.htm

On the other hand it would also be cool to see the other part of anti-tank mine warfare: automated mine laying. Either done by artillery (CoC - are you reading this...) or by laying them from a APC.

Share this post


Link to post
Share on other sites

Man, that M60 MICLIC sure looks ugly... and from the article it seems like it's not that effective... hmmm... still, a nice "poor division's MRLS"!!! ROFLMAO!!! biggrin_o.gif

Share this post


Link to post
Share on other sites

the new script that was made for this is evne better and will cause less damage.we might make the blades and stuff later.

I was even thinking aboot making a AT mines pack since hte AT mine in OFP is way way to powerful.

ones that will evne be denotated bu humans..

like in real life.

but We have a few other tihngs to do before We get to that..

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×