FW200 0 Posted April 24, 2013 I'm working (for old times sake) on a plane, on which I have 2 doors and a ladder. I want the plane to be locked when the doors are closed and when the doors are opened the plane to be unlocked. However I can't even seem to get the Open door thing to work.. My addon knowledge stems from the Operation Flashpoint era, and so do these scripts.. so any help would be nice :) So this is what I have: CONFIG.CPP: class AnimationSources { class leftdoor { source = "user"; animPeriod = 2; initPhase=0; }; class rightdoor { source = "user"; animPeriod = 2; initPhase=0; }; class ladder { source = "user"; animPeriod = 2; initPhase=0; }; }; class UserActions { class FWA_AN14DOORSOPEN { displayName = "Open Door"; position = "door"; radius = 5; onlyForPlayer = 0; condition = "this animationPhase ""leftdoor"" < 0.5"; statement = "this exec ""\FWA_AN14\opendoor.sqf"""; }; class FWA_AN14DOORSCLOSE { displayName = "Close Door"; position = "door"; radius = 5; onlyForPlayer = 0; condition = "this animationPhase ""leftdoor"" > 0.5"; statement = "this exec ""\FWA_AN14\closedoor.sqf"""; }; }; }; The doors and ladder have been defined in the model.cfg and do actually work in Buldozer. Opendoor.sqf: _plane = _this select 0 _plane animate ["leftdoor", 1]; _plane animate ["rightdoor", 1]; sleep 0.5; _plane animate ["ladder", 1]; exit closedoor.sqf is pretty much the same except in reverse.. Share this post Link to post Share on other sites
Sealife 22 Posted April 24, 2013 this exec maybe its this execvm for .sqf ? Share this post Link to post Share on other sites
columdrum 11 Posted April 24, 2013 (edited) Change exec to execVM (you are using sqf sintax) Change the script for this one: _plane = _this;_plane animate ["leftdoor", 1]; _plane animate ["rightdoor", 1]; sleep 0.5; _plane animate ["ladder", 1]; profit The main problem its that you were passing the object as it was( this exec ....) and then on the script you used it as it was an array ( _this select 0). Edited April 24, 2013 by columdrum Share this post Link to post Share on other sites
FW200 0 Posted April 24, 2013 Yay that was it :) Thanks a lot! Do you also happen to know how I could lock the plane ? ---------- Post added at 20:02 ---------- Previous post was at 19:44 ---------- Never mind, got that going too :) Share this post Link to post Share on other sites