Jump to content
Sign in to follow this  

Recommended Posts

Is there a way to remove object's default action? Or maybe overwrite that action's code by my own?

In the editor there is cargo container which has doors. What I want to do is make those doors secured by keycode, so only players who know this code can open it. I've already made and attached such action, it pops-up a keypad and opens door only if code is correct. But there is still default "Open door" action. Can it be removed?

Share this post


Link to post
Share on other sites

Hi BeePee,

This is probably defined in the objects config so one way would be to define a replacement config. However, you could try this method of removing all actions in script first...

_dummyAction = _object addAction["foo", "foo.sqf"];
while {_action >= 0} do {
   _object removeAction _action;
   _action = _action - 1;
};

_object would obviously be your container. I have used this before in an Arma mission a long time ago - not used it in ToH though.

Share this post


Link to post
Share on other sites

Hi Jedra,

Can you make a little tutorial about defining/modifying configs? What tools do I need, where to find original object config, what to edit and how to repack it to make it work as addon. Or maybe throw some links where I can find such informations. Thanks.

Share this post


Link to post
Share on other sites

BeePee - this is quite a job as it really depends which part of the the config you are trying to change and whether you are writing a new one or a replacement.

By far the best resource is the Configs and Scripting section over in the Operation Arrowhead editing forums. The techniques are exactly the same and other than the flight model stuff the configs are the same too.

As for some useful tools;

To extract a pbo you will need something like Eliteness and DePbo which you can get here.

To decode a config.bin file you will need unrap.exe which you can get here (Look for the Arma tools section).

To edit a config.cpp file (which is what a config.bin file is when you 'unrap' it) you just need notepad or any other text or code editor (notepad++, dreamweaver, Visual Studio etc etc etc).

To wrap it all back up again you need the BI Tools - you can find a link here. BinPBO is the application which wraps your addon back into a pbo - but this package from BI also has all the other tools you need to become a full fledged modder!!

Hope this is of some help!

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  

×