Jump to content
Sign in to follow this  
Sniper_Kyle

Simple Addon Question

Recommended Posts

help.gif

Having searched the forums, surprisingly I haven't come up with anything that would help me with what would seem to be an easy task.  I just want to make an addon that adds an action for the current player to use, and when he uses that action, it executes another script inside the addon. How would I do this? Do I still need a config file?

Taking apart a few addons would yield some answers to this I'm sure, but not all addon makers put verbose comments so sometimes their work can be difficult to understand and it would hold up any progress for quite some time.

Thanks for reading and hopefully someone can help me with this problem  smile_o.gif

Share this post


Link to post
Share on other sites

There are two ways to append action. By command and by defining it in addon configuration file.

If you just want to add an action to player then you don't have to create new addon. Just add it in mission using command.

Share this post


Link to post
Share on other sites

Thank you for the quick reply Faguss notworthy.gif .

I think I should opt for the addon config file. Let me explain the addon further so that anyone reading this can get a better grasp on what I'm trying to do. I want to make a radio for the player (myself) to use in whatever mission I'm in, whether it is singleplayer or multiplayer. I want that radio to be accessible by the action menu.

Is this problem more complex than I had originally thought?

Share this post


Link to post
Share on other sites

Nope, unless the addon is a "weapon" : is it a static object, or will the player "put the radio" on his back ?

Share this post


Link to post
Share on other sites

Oh, sorry. I meant that the addon is a radio as in a music player, so I'm not sure how to implement it. A game logic sort of makes sense but I don't know how it would work in multiplayer.

Sadly the only addon I know of that does something similar to what I need to do (action menu for player in multiplayer) is some stupid cheat pack. I have been taking it apart and seeing how it works, but they seem to implement it a roundabout way to get around cheat protection or something so it is difficult to understand. crazy_o.gif

Share this post


Link to post
Share on other sites

Actions in addons are always assigned to specific object. It is possible to replace unit's actions (via config file) but not standard soldier's.

You can't modify it's config. No access.

It's achievable by cheats because they override original configuration.

Share this post


Link to post
Share on other sites

Thank you all so VERY much for your help, and I think I have been pushed in the right direction. I'll use Walter's individual mission solution temporarily while I work on hacking the config with things I've learned from the cheated configs. Thank you all once again guys, and if anyone has more input on anything please feel free to update the topic smile_o.gif

-Kyle

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  

×