Jump to content
Sign in to follow this  
Bullz_eye_on_my_back

Putting all scripts into a single .pbo file

Recommended Posts

I've created a set of scripts to be useful for everyone. It is primarly made for my Security Cams that was realeased, but has several uses. Especially for Mission makers. It's basically a positioning tool for any object and can watch it in game to and get all of the readouts in the coordinates. It has the ability to select up to 999 objects placed into the mission.

I've made a description file and put it into a resource.cpp file...

Then I renamed the parent classes to like something "bullzeye_rsctext" and did it through out.

But when I tried it all in the game. It won't take my sliders or my list boxes...

on the list boxes it says it doesn't have ".text"

and on the sliders it says invalid "colorB"

Then i exited and came back and it says it can't find the dialog.... sad_o.gif

I want to place it all in one single small addon so then it won't take up space and can easily be used for everyone....

Can anyone help me set up my resource.cpp file?

Share this post


Link to post
Share on other sites
Guest

I think that dialogs can't be completely encapsulated in addons since they require an description.ext in the mission folder. rock.gif

Share this post


Link to post
Share on other sites

When you begin to do that you create a lot of bugs cause you are not clean.

1) Remove all description.ext in the mission folder

2) Create a new description.ext with this :

#include <TheNameOfYourAddon\resource.cpp>

Note : resource.cpp could be helloworld.txt, works too. You need only text

3)For dialog names take care of double name or a scripter allows same name : NameOfTheAddonMainDialog, no mainDialog

Share this post


Link to post
Share on other sites

Well I figured it out thanks to looking at uiox resource file.

For anyone wanting to put their dialogs in with an addon....

always remember not to use the defined names for "style" and "text"

only use the numbers and actual names of the text

for example. style ct_left ...should only be 0

fonthtml ...should be "courierNewB64"

and on down the list... biggrin_o.gif

Share this post


Link to post
Share on other sites

The F18 Hornet has an optional dialog for setting up the CBU. You may check it out if you wish to see another example of an addon that uses a dialog. You may download it here:

ftp://www.gamezone.cz/ofpd/unofaddons2/Rad_F18_v1_0.zip

The instructions tell you how to enable the diaglog. You do have to include a header file in the description.ext. I found this to be the only way. I also left this as a configuration option, because some ppl dont know enough to edit the description.ext or just forget to add it.

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  

×