Twiznak 57 Posted May 6, 2020 Hi! I need help with hiding the doors of a building. I have googled it and I haven't found a post of any kind on this exact topic. I used the examples given on animate animateSource & animateDoor, but I can only get them to open/close doors and hide the doors of vehicles. If anyone knows how to do this, would you please show me? Share this post Link to post Share on other sites
Harzach 2511 Posted May 6, 2020 Can you provide an example mission where doors are hidden? I've never seen such a thing. Share this post Link to post Share on other sites
Twiznak 57 Posted May 6, 2020 6 minutes ago, Harzach said: Can you provide an example mission where doors are hidden? I've never seen such a thing. HI! Thank you for replying. Here are the links https://community.bistudio.com/wiki/animateSource the hide turret part from example 2: Example 2: Create UGV and manipulate its turret (Currently not possible to do with animate command. See createVehicle/vehicles for reference) ugv = "B_UGV_01_F" createVehicle (player getRelPos [5, 0]); ugv addAction ["Show Turret", { ugv animateSource ["Turret", 0]; ugv animateSource ["MainTurret", rad 0, true]; ugv animateSource ["MainGun", rad 0, true]; }]; ugv addAction ["Hide Turret", {ugv animateSource ["Turret", 1]}]; ugv addAction ["Turret Left", {ugv animateSource ["MainTurret", rad 90]}]; ugv addAction ["Turret Right", {ugv animateSource ["MainTurret", -rad 90]}]; ugv addAction ["Turret Up", {ugv animateSource ["MainGun", rad 30]}]; ugv addAction ["Turret Down", {ugv animateSource ["MainGun", -rad 20]}]; https://www.reddit.com/r/armadev/comments/1jzitu/a3_hiding_doors_on_vehicles/ this post has a reply with a bit of code that , I tested and confirmed working, hides the doors on the civilian hummingbird: this animate ["addDoors",1]; <- to add doors. this animate ["addDoors",0]; <- to remove doors. but, there is NO BIWiki page for "addDoors". So i'm stumped here. Share this post Link to post Share on other sites
Twiznak 57 Posted May 7, 2020 I actually just found an error on the animateSource example two: ugv addAction ["Hide Turret", {ugv animateSource ["Turret", 1]}]; needs to have a semicolon to work ugv addAction ["Hide Turret", {ugv animateSource ["Turret", 1];}]; BUT I can't log to the community page to make a note or suggest a correction. bummer. Share this post Link to post Share on other sites
Harzach 2511 Posted May 7, 2020 "addDoors" isn't a command. It's the animation name that you are applying animate to. I am all but certain that building doors do not have an animation that hides them. I may be wrong, but I have never seen it. Animation names for a typical building: ["door_1_rot","door_1_locked_rot"] Share this post Link to post Share on other sites
Harzach 2511 Posted May 7, 2020 11 minutes ago, Twiznak said: I actually just found an error That code works fine. 1 Share this post Link to post Share on other sites
Twiznak 57 Posted May 7, 2020 Gave me an error in the editor, said I was missing a ";" on line 8. I added one as a showed and no more error. Share this post Link to post Share on other sites
Harzach 2511 Posted May 7, 2020 45 minutes ago, Twiznak said: Gave me an error in the editor, said I was missing a ";" on line 8. I added one as a showed and no more error. Notice that there is no such semicolon in any of the other addActions. It's not necessary, there must have been something else wrong. Share this post Link to post Share on other sites
Twiznak 57 Posted May 7, 2020 5 minutes ago, Harzach said: Notice that there is no such semicolon in any of the other addActions. It's not necessary, there must have been something else wrong. ugv addAction ["Show Turret", { ugv animateSource ["Turret", 0]; //what are these? ugv animateSource ["MainTurret", rad 0, true]; //what are these? ugv animateSource ["MainGun", rad 0, true]; //what are these? }]; You have been very helpful, thank you. Share this post Link to post Share on other sites
Harzach 2511 Posted May 7, 2020 31 minutes ago, Twiznak said: what are these? A different addAction with three separate expressions, each of which requires a following semicolon. The line of code you referenced ugv addAction ["Hide Turret", {ugv animateSource ["Turret", 1]}]; //one expression followed by closing brackets and semicolon, nice and tidy is followed by these lines with identical structure ugv addAction ["Turret Left", {ugv animateSource ["MainTurret", rad 90]}]; ugv addAction ["Turret Right", {ugv animateSource ["MainTurret", -rad 90]}]; ugv addAction ["Turret Up", {ugv animateSource ["MainGun", rad 30]}]; ugv addAction ["Turret Down", {ugv animateSource ["MainGun", -rad 20]}]; and is different from this ugv addAction ["Show Turret", { ugv animateSource ["Turret", 0]; //separate expression, needs following semicolon ugv animateSource ["MainTurret", rad 0, true]; //separate expression, needs following semicolon ugv animateSource ["MainGun", rad 0, true]; //separate expression, needs following semicolon }]; *edit* - Tired and making dinner, so bear with me! It's all about the separate expressions. Line breaks are sort of irrelevant. Edited above to clarify. Regarding your original code working, I literally copy/pasted it into debug and ran it with success. All addActions were present and functional. 1 Share this post Link to post Share on other sites