daza 36 Posted September 23, 2009 (edited) I had a friend create a simple object for a little addon i am creating, but my script (which does work with a standard object in Arma2) wont add a addaction to the new object. Any ideas as to why? and how can i fix that? It isn't the script. As it works with a built object. And the new object displays correctly in game...i dont know what to do here...but i do need to be able to run a addaction script from it.. **I tested it further by creating a basic addaction script and putting it directly into the init of object in editor and still doesnt work, with another object from editor next to that, i did the same and the addaction is seen and works. Just the custom object has nothing** any ideas much appreciated. :) Daza Edited September 24, 2009 by Daza Share this post Link to post Share on other sites
emcnally 0 Posted September 26, 2009 Hi Daza, I'm not totally familiar with modeling yet But if the script does work on other objects and not the created object made by your friend seems that there would have to be something on the model to be able to initiate the object like a cargo space if your going to moveincargo or a drivers position to movein driver. For instance, the folding chair model gives you the ability to addaction of moveincargo, so addaction will work for it only if you want to moveincargo. Does the model have anything like that? Just a thought. I have done a bit of modeling in OFP and you had to have something like that before the addaction would work. Share this post Link to post Share on other sites
daza 36 Posted September 28, 2009 Thanks Emcnally for your comments. Its a small object for a tracking mission im making. I was using a green soda can originally that is in the editor and i was able to add an addaction to that. But i will pass on what you said to my friend and see if he can add a cargo space just to see if that would make a difference. I dont know anything about modeling either, but i do hope in the future to learn alittle bit more. I will give some feedback on this thread if it works. Share this post Link to post Share on other sites
[aps]gnat 28 Posted September 28, 2009 Are you using the class in the models Config to add actions "permanently" ? These actions can be used to call scripts too. class UserActions { class OpenDoor { displayName="Open Ramp"; position="actions"; radius=15; condition="this animationPhase ""Cargo_ramp_1"" < 0.4&&(getPos this) select 2 < 10;"; statement="this animate [""Cargo_ramp_1"", 1];this animate [""Cargo_ramp_2"", 1]"; onlyforplayer = true; }; class OpenPara { displayName="Open Ramp"; position="actions"; radius=15; condition="this animationPhase ""Cargo_ramp_1"" < 0.4&&(getPos this) select 2 >= 10;"; statement="this animate [""Cargo_ramp_1"", 0.40];this animate [""Cargo_ramp_2"", 1]"; onlyforplayer = true; }; ............ ........... Share this post Link to post Share on other sites
bad benson 1733 Posted September 30, 2009 check this out http://tactical.nekromantix.com/tactical/wiki/doku.php?id=ofp:modeling:brsseb_lesson9 somewhere at the bottom of the part about the memory lod. and later on it's explained how to add that into the config. in short. u have to add a point into the memory lod. that point is the position which u need to get to ingame to make the useraction available. so if u have made a house for example, that's to make sure that the useraction for opening the door is only available when u are close to that door. hope u understand what i mean. i'm overall not sure, if this is right but it's worth a try i think;) Share this post Link to post Share on other sites
daza 36 Posted October 2, 2009 Thanks you guys for your suggestions. Is a position really needed for a simple model? its a basic small object. I tried using that config example Gnat but it caused binpbo to crash. Im guessing because there was no position called "actions". I dont know what im doing really, i was hoping once i had the model made it would be no problem from there. Share this post Link to post Share on other sites
[aps]gnat 28 Posted October 2, 2009 Per PM, need more info. Share this post Link to post Share on other sites
[aps]gnat 28 Posted October 3, 2009 ok, so change your config from this; #define true 1 #define false 0 #define VSoft 0 #define VArmor 1 #define VAir 2 #define private 0 #define protected 1 #define public 2 #define TEast 0 #define TWest 1 #define TGuerrila 2 #define TCivilian 3 #define TSideUnknown 4 #define TEnemy 5 #define TFriendly 6 #define TLogic 7 #define ReadAndWrite 0 #define ReadAndCreate 1 #define ReadOnly 2 #define ReadOnlyVerified 3 class CfgPatches { class NZDF { units[]={box}; requiredVersion = 1.0; requiredAddons[] = {}; }; }; class CfgVehicleClasses { class NZDF_Obj { displayName = "NZDF: Objects"; }; }; class CfgFactionClasses { class NZDF { displayName = NZDF: Modern; priority = 100; side = 1; }; }; class cfgVehicles { /*extern*/ class Static; class box: Static { scope = 2; displayName = "red box2"; vehicleClass = "NZDF_Obj"; faction = NZDF; model = "\Redbox_alpha\box2.p3d"; }; }; I'm assuming CfgVehicleClasses and CfgFactionClasses is OK, because I've never used them. So change to this; (only the UserActions has been added) #define true 1 #define false 0 #define VSoft 0 #define VArmor 1 #define VAir 2 #define private 0 #define protected 1 #define public 2 #define TEast 0 #define TWest 1 #define TGuerrila 2 #define TCivilian 3 #define TSideUnknown 4 #define TEnemy 5 #define TFriendly 6 #define TLogic 7 #define ReadAndWrite 0 #define ReadAndCreate 1 #define ReadOnly 2 #define ReadOnlyVerified 3 class CfgPatches { class NZDF { units[]={box}; requiredVersion = 1.0; requiredAddons[] = {}; }; }; class CfgVehicleClasses { class NZDF_Obj { displayName = "NZDF: Objects"; }; }; class CfgFactionClasses { class NZDF { displayName = NZDF: Modern; priority = 100; side = 1; }; }; class cfgVehicles { /*extern*/ class Static; class box: Static { scope = 2; displayName = "red box2"; vehicleClass = "NZDF_Obj"; faction = NZDF; model = "\Redbox_alpha\box2.p3d"; class UserActions { class ObjectAction1 { displayName="Examine Tracks"; // menu name position="apoint"; //a point named "apoint" in objects memory LOD onlyforplayer=0; radius=0.5; // raduis of action in meters around object condition=true; // action is always available statement="[this] execvm ""\Redbox_alpha\exam1.sqf"""; //what happens when the action is triggered }; }; }; }; The above assumes your script (exam1.sqf) is also inside the directory of the addon. Untested, but should work. One of the only reasons it may not work; 1) you dont have the point inside the Memory LOD of the P3D file 2) the object class "Static" doesn't support "UserActions" (but I'm fairly sure it does) Best of luck. Share this post Link to post Share on other sites
daza 36 Posted October 3, 2009 Thanks Gnat for that, unfortunately it didnt work. So it must be perhaps there isnt a point inside Memory LOD. Share this post Link to post Share on other sites
[aps]gnat 28 Posted December 5, 2009 WFT! Hmmm .... I'm now getting a problem where a perfectly normal custom air model with several UserActions defined to several different memory points just plain REFUSES to work at all ! Yet it works fine on the B-52 I released! Its making no sense. Increased the radius .... no help. Simply set the "condition" to TRUE .... still no help. Put points in Memory and CargoViews .... nothing. The ArmAII engine is reading the UserActions definition as you place it in the editor, because I can create errors by leaving out definitions ..... but its not using the UserActions ffs. Weirdest problem :( Share this post Link to post Share on other sites
Planck 1 Posted December 5, 2009 Are you using vanilla Arma2 1.04 .exe or one of the beta versions? Planck Share this post Link to post Share on other sites
[aps]gnat 28 Posted December 6, 2009 Hmmm ... good point. I'm using a beta. I better test with either/both another beta and the 1.04. Will report soon ..... Share this post Link to post Share on other sites
[aps]gnat 28 Posted December 7, 2009 Nope ... didn't work. But now my bloody computer is BSOD'ing on boot-up ffs .... hope it wasn't that very latest ArmAII beta release I installed :/ Looks like I may have to Santa myself a new computer :) Share this post Link to post Share on other sites
Aqu 0 Posted December 7, 2009 I have had this same problem. Models which worked in Arma1 have custom actions failing in Arma2 often (they do not show). Because I had to adjust my crew proxy locations in 9 cases out 10 I thought this could because the crew hot spots (the point from which the distance is calculated) are set differently in Arma2. So I tryed to increase the distance or re-position the memory points. In some models this worked but not in others. Share this post Link to post Share on other sites