English Solved How to Add Interactive Objects to the Company System

Bundestag

User
3/4/21
25
1
1
300
Hello dear The-Programmer Forum,
i want do make an Object that is placed with the Company System and i wanted to know what do I have to pay attention to when implementing the objects?
I also want it to be fully implementetd in the Company-System like the other objects.

I allready Saw the Object Part in the Config and i also saw these tow things:
S’il vous plaît, Connexion ou S'inscrire pour voir le code !

So, for starters, do also create files like fnOnPlaceInfoStandV1 like the other objects have or can i add an addAction right into it.
And if i can add it right away, will it also be only acessebel for the Company employes?
 
Solution
Hey ! Since the 3.2 update, you're able to add new placeables items in the config_master.cpp of the script.

So in the config file, below :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !
you can add :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !
Replace OBJECT_CLASSNAME by the object classname, it must be of a different classname from other placeable objects in the "company_placeable_objects"

Then, in your mission folder, create (in the folder you want, for example core/actions) a fn_companyProcessObject.sqf with the...

Maxence

Admin
Membre du personnel
Hey ! Since the 3.2 update, you're able to add new placeables items in the config_master.cpp of the script.

So in the config file, below :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !
you can add :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !
Replace OBJECT_CLASSNAME by the object classname, it must be of a different classname from other placeable objects in the "company_placeable_objects"

Then, in your mission folder, create (in the folder you want, for example core/actions) a fn_companyProcessObject.sqf with the following code :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !
I won't go into the details of this code, but if you want to make yet another panel afterwards, you'll have to modify lines 21 and 26 whose "2" corresponds to the case in the file I'm going to tell you about next.

Don't forget that if you create a new mission file, you'll have to define the function in your Functions.hpp, like that :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !

Last thing, to choose which action to add, in your @The_Programmer/addons/company_system/client/tp_entrepriseAddAction.sqf, below :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !
add :
S’il vous plaît, Connexion ou S'inscrire pour voir le code !
You will also be able to change the process action, here I put the iron process. If you copy and paste the init of an object you already have on your map, don't forget to replace this with _object

I hope everything will work like that 😁
 
Solution
Activité
Pour l'instant, il n'y a personne ici