Jump to content

Charles Barkley

  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

About Charles Barkley

  • Rank
    Private First Class

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I have the following CfgVehicles.hpp where I have a backpack which should initialize my script class CfgVehicles{ class B_AssaultPack_Base; class ReconMod_Camp_Backpack: B_AssaultPack_Base{ scope = 2; displayName = "Recon camp backpack"; vechicleClass = "Recon Mod"; icon = "reconmod\data\images\reconmod_icon.paa"; class eventhandlers{ init = "_null = this call ReconMod_fnc_backpackInit;"; } }; }; This does not work. But when I have this this call ReconMod_fnc_backpackInit; Within the init line in the Eden Editor everything works as expected. What did I miss to make the init call through the CfgVehicles.hpp work? Greetings Charlie
  2. Thank you. I missed the PBOPREFIX part
  3. That was the problem! But I did not fully grasped the reason? Is prefix in \camp like the name of my .pbo file or what? And if so? Do I need to kinda dynamically add it when packing an addon/pbo ? Because in my mission I cannot use this prefix - the path is invalid for it. I saw ALiVE Mod using file paths like "x/addon/functioname.sqf" but I assume they replace the "x" with a proper value for either addon packing or testing in a mission, aye?
  4. Hey guys! I come across a mean issue where I am not able to use the function configuration that works for my addon-test mission in my packed addon.pbo. Erros in .rpt on startup 15:20:01 Warning Message: Script camp\fn_buildCampsite.sqf not found 15:20:01 Warning Message: Script camp\fn_packCampsiteItem.sqf not found 15:20:01 Warning Message: Script init\fn_init.sqf not found 15:20:01 Warning Message: Script init\fn_backpackInit.sqf not found 15:20:01 Warning Message: Script utils\fn_log.sqf not found .pbo file structure CfgFunctions.hpp class CfgFunctions{ class ReconMod{ class Camp{ file = "camp"; class buildCampsite {}; class packCampsiteItem {}; } class Init{ file = "init"; class init{preInit = 1;}; class backpackInit {}; } class Utils{ file = "utils"; class log{}; } } } CfgPatches.hpp class CfgPatches { class ReconMod { author = "xetra11"; name = "Recon Mod"; version = "1.0"; units[] = {}; weapons[] = {}; requiredVersion = 1.0; requiredAddons[] = {}; }; }; config.cpp #include <CfgFunctions.hpp> #include <CfgVehicles.hpp> #include <CfgPatches.hpp> Did I miss a part where it says to have functions work in an addon I have to go another way of declaring functions? Thanks for your help in advance!
  5. Charles Barkley

    hideObjectGlobal remove shadows and actions?

    I found out that I have to call this function to the _holder of the object not the object itself :/ hard to grasp
  6. I used the following script on my backpack item: _backpackItem hideObjectGlobal true; When running the result is the following: I would like to make it completly invisible (remove dangling shadows) and non-interactive (disable actions) How to achieve that? The documentation hints me that this should be actually working like that. Greetings Charlie!
  7. I created a campsite with the BIS_fnc_ObjectMapper function. Also I added a "remove camp" action for every item/object in the array that has been mapped. The *remove* function is trying to get the items holder by calling *objectParent* and running a script like this: _campItemHolder = objectParent _target; clearBackpackCargoGlobal _campItemHolder; deleteVehicle _campItemHolder; sadly there is not holder for this item available and therefore I am not able to remove the campsite or it's items. Any idea how to solve this?
  8. ohhhh... It is so weird with these differences in the syntax to figure such mistakes out :3 Thanks!
  9. This is my code now _holder objectParent _target; clearBackpackCargoGlobal _holder; deleteVehicle _holder; and this my error message when I run the action on the backpack _holder objectParent _target; clearBackp> 20:53:10 Error position: <_holder objectParent _target; clearBackp> 20:53:10 Error Undefined variable in expression: _holder 20:53:10 File camp\fn_buildCampsite.sqf [ReconMod_fnc_buildCampsite], line 40
  10. Thanks I try it
  11. Can you explain why I first have to add it to a container before I remove it? Because placing it in the first place - isn't the backpack added to a global (world) container therefore and should be "deletable" as well?
  12. I want to have a backpack initialized with an action to build up a campsite. For now I have the working script to add the action to the backpack and run the script as the action is triggered/used. Now I want the backpack to disappear after the campsite has been built up. I tried to call deleteVehicle but failed. I think it is because the script is bound to the object that I want to remove and therefore does not work. What I am looking for is like a custom event I might create? Like publishing an event called campFinished and registering and event handler to my object which will kill it in the callback function. Is something like this possible? If not - what is the common approach to achieve a similar result? Complete code is open here: https://github.com/xetra11/ReconMod If anybody wants to reproduce it on it's own. fn_backpackInit.sqf params ["_backpackItem"]; format['init backpack: %1', typeOf _backpackItem] call ReconMod_fnc_log; _backpackItem addAction ["Build Recon Camp", ReconMod_fnc_buildCampsite]; fn_buildCampsite.sqf (last line is my try to delete the backpack - does not work) params ["_target", "_caller"]; private ["_message", "_campComposition"]; _message = format['%1 is building up a campsite', name _caller]; hint _message; 'playing build up animation' call ReconMod_fnc_log; _caller playMove "AinvPknlMstpSnonWnonDnon_medicUp3"; _campComposition = [ ["Land_FirePlace_F",[0.407715,-0.0605469,0.00431442],0,1,0,[],"","",true,false], ["Land_WoodenLog_F",[1.30078,-1.04712,4.19617e-005],0,1,0,[],"","",true,false], ["Land_Ground_sheet_folded_khaki_F",[-0.0664063,1.74048,8.01086e-005],260.778,1,0,[],"","",true,false], ["Land_Laptop_02_unfolded_F",[1.31445,-1.0542,0.5],136.964,1,0,[],"","",true,false], ["Land_Sleeping_bag_F",[-1.36768,-0.928467,-0.00595856],37.9681,1,0,[],"","",true,false], ["Land_Sleeping_bag_brown_folded_F",[2.34326,-0.0712891,-3.8147e-006],245.926,1,0,[],"","",true,false], ["Land_Sleeping_bag_F",[-0.641113,1.8584,-0.0278778],174.749,1,0,[],"","",true,false], ["Land_Sleeping_bag_F",[2.49707,0.719482,0.0018959],266.758,1,0,[],"","",true,false], ["Land_Ground_sheet_khaki_F",[3.14111,-0.101318,3.8147e-006],96.0028,1,0,[],"","",true,false], ["Land_CanisterFuel_F",[-2.85938,1.72168,0.000972748],191.718,1,0,[],"","",true,false], ["Land_Ammobox_rounds_F",[3.03857,1.61816,0.00495911],218.802,1,0,[],"","",true,false], ["Land_TentDome_F",[-4.22217,-0.0065918,0.00314331],181.884,1,0,[],"","",true,false], ["Land_Ammobox_rounds_F",[3.88281,1.70947,9.53674e-005],143.886,1,0,[],"","",true,false], ["Land_TentDome_F",[-2.9668,3.74658,0.0138435],215.286,1,0,[],"","",true,false], ["Land_TentDome_F",[3.51807,3.35718,0.00638962],320.122,1,0,[],"","",true,false] ]; 'constructing camp...' call ReconMod_fnc_log; [position _caller, 0, _campComposition] call BIS_fnc_ObjectsMapper; 'camp build!' call ReconMod_fnc_log; hint 'recon camp has been built up'; _message = format['deleting campsite building item: %1', _target]; _message call ReconMod_fnc_log; deleteVehicle _target;
  13. Charles Barkley

    modelToWorld and snap item to surface?

    Thank you for your help guys!
  14. Hey everybody, I am working on my first script and unfortunately can not find any results at google or in here for a specific question. I hope it therefore is actually possible! Please consider following script snippet _tent = _tentType createVehicle [0,0,0]; 'tent spawned to world' call ReconMod_fnc_log; _tent setpos (_caller modelToWorld [-5,5,0]); 'tent moved to player position' call ReconMod_fnc_log; And this is how the tent spawns. I would like to have it snapping to the surface. When I try so spawn it on a hill or something it happens to disappear completely