Jump to content
Sign in to follow this  
tj72

Requesting the Basics about addon scripting

Recommended Posts

I was hoping there was a resource or tutorial around for how to bind scripts to an addon. I have searched but couldnt find.

Something like a radio object the player has to get near to gain an action or get a dialogue.

I dont have any other specifics I was just wondering if there was a basic guideline to get me going.

Share this post


Link to post
Share on other sites

Thanks for reply.

I guess I will look into O2 and check around the wiki for these guides. It seems like a good topic for sticky since it seems hard to find the info. If I could get working examples of making a simple addon that has scripting builtin I could probably take it from there.

Share this post


Link to post
Share on other sites
Something like a radio object the player has to get near to gain an action or get a dialogue.

That yells for a UserAction. It does about the same as the scripting command 'addaction', but with a few more possibilites.

Here's a example (2nd code box):

http://community.bistudio.com/wiki/Animations

The class UserActions goes into your objects class, like this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgVehicles {

       class xyz;

       class yourObject : xyz {

               // bunch of properties

               class UserActions {

                       // define your useractions here

               };

       };

};

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  

×