j-man 0 Posted December 8, 2003 Is there a way to simulate a repair kit? 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? Share this post Link to post Share on other sites
bn880 5 Posted December 8, 2003 You can have a look at the working mission nogova source. Search for TWMN. 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. Share this post Link to post Share on other sites
Skul 0 Posted December 8, 2003 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? [Gareth Gates must die] Share this post Link to post Share on other sites
j-man 0 Posted December 9, 2003 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. Share this post Link to post Share on other sites
Sgt_Wilson 0 Posted December 9, 2003 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 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
j-man 0 Posted December 9, 2003 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 I probably wont add a repair kit to my mission if it's this complicated. But thnx for all the help Ps. Great mission bn880 Share this post Link to post Share on other sites
bn880 5 Posted December 9, 2003 Ok yes thanks (you actually got it running with all those addons), I think you might be able to make something simpler, it is entirely possible I over complicated things back then. Share this post Link to post Share on other sites