Jump to content
Sign in to follow this  
j-man

Repair kit?

Recommended Posts

Is there a way to simulate a repair kit? rock.gif Like when the player has a repair kit and he is a certain distance to any vehicle then he has the option to repair it.

Any ideas? rock.gif

Share this post


Link to post
Share on other sites

You can have a look at the working mission nogova source.

Search for TWMN. smile_o.gif

EDIT: Most likely it is a start but you would probably have to expand it to be more automatic etc... when I wrote TWMN, there were still many scripting limitations, and it's not the best code at all from the understanding of OFP scripting I had. smile_o.gif

Share this post


Link to post
Share on other sites

Try something like what I did in a mission of mine. Group a vehicle with a trigger and put in the trigger's On Activation line:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">vehicle player AddAction ["Repair", "fix.sqs"]

Does that help? smile_o.gif

[Gareth Gates must die]

Share this post


Link to post
Share on other sites

All good sugestions, but couldn't you use a nearestobject command so that if the player is near any vehicle then he would get the repair option. rock.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]All good sugestions, but couldn't you use a nearestobject command so that if the player is near any vehicle then he would get the repair option.

Depends on what you are trying to do, is it for a Mission, Addon or Generic script? Your being a bit coy about that smile_o.gif

You would have to use NearestObject with a specific type like "T80". So if you want to repair lots of different vehicles, you would have to put all there types in an array. So you can check for them all in your loop.

Share this post


Link to post
Share on other sites

I need this script for a mission i'm making. I checked out the script in TWMN and its exectly what I need, but it's bit too complicated ofr me tounge_o.gif

I probably wont add a repair kit to my mission if it's this complicated. But thnx for all the help biggrin_o.gif

Ps. Great mission bn880 biggrin_o.gif

Share this post


Link to post
Share on other sites

Ok yes thanks (you actually got it running wow_o.gif with all those addons), I think you might be able to make something simpler, it is entirely possible I over complicated things back then. tounge_o.gif

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  

×