Jump to content
avibird 1

Can you use the same code lines to open vanilla Gates and or indoors in a Custom building ?

Recommended Posts

Hello I know how to setup codes to open gates and doors using vanilla assets with triggers but can it be down with a custom building. The building has two large hanger doors that go up and down but I don't see it labeled in model.  I don't know if the animations are hard coded this building come from a mod. It works perfect if you select to open or closed the doors. I just want it to work on a trigger for the mission. Avibird.

 

 

This is the mod 

https://steamcommunity.com/sharedfiles/filedetails/?id=2597865629

 

 

 

Share this post


Link to post
Share on other sites

In debug console, use a watch line for testing on cursorObject:

animationNames cursorObject

Pointing at a "land_imp_manufactorum" (example), will return: ["open_door1","open_door2"]

Note : you can find same value in config viewer (right click on edited object / find in config viewer / double click on the highlighted class at left then double click on animation sources.

 

Now for your trigger, test some thing like :

yourBuildingName animate ["open_door1",1,false]; yourBuildingName animate ["open_door2",1,false]; // opening the doors

yourBuildingName animate ["open_door1",0,false]; yourBuildingName animate ["open_door2",0,false]; // closing the doors

 

  • Like 1

Share this post


Link to post
Share on other sites

Hey pierremgi thanks for thanks for your response. This was the message from the mod author.

 

Thanks for your interest in my mod, Avibird! I was able to get the doors to the Manufactorum to open by running "_this animateSource ["open_door1", 1, 1];" on the object while in Zeus. All of the buildings in this mod follow a similar door convention, so open_doorX will correspond to single doors or windows on each object. Double doors use the open_doorXandY format. I hope this points you in the right direction!

 

I briefly attempted it yesterday but cannot get it to work. 

 

The idea a concept for mission design that I have in mind. In the Manufactorum building there will be a Titan and a juggernaut AT/artillery platform vehicle inside the building with two groups of 2 man with a Sentry get in and guard waypoint for the groups. With two more units in a second group outside of the building. The concept is to kill the units and get into the building before the groups inside get activated with the  waypoints. The issue I am having with editor placed waypoints the units will not open the facility door but if I give a unit a waypoint using Zeus the doors will automatically open once the unit approaches the door however the door will not open when a vehicle approaches the door either with editor place waypoints or Zeus place waypoints. I am lost at this point to understand why. Avibird.

Share this post


Link to post
Share on other sites

I just tested with animate like i wrote, and that worked. _this has no sense on the object. It's a magic variable referring to specific passed parameter(s). In object, use this. In trigger, name your object and use my code (with your object's name of course).

For your trigger activation (if any), need more info.

  • Like 1

Share this post


Link to post
Share on other sites

Thank you brother I will try when I get home thank you.

Share this post


Link to post
Share on other sites

Hey brother can't get it to work at all. 

 

Bld1 animate ["open_door1",1,false];  

Share this post


Link to post
Share on other sites

which building? I tested on "land_imp_manufactorum" class. Two gates "open-door1" & "open_door2". Did you try both? are you sure for a name?

  • Thanks 1

Share this post


Link to post
Share on other sites

Hey pierremgi yes it's that building and yes I attempted for both doors. I can't get the trigger to open doors. The funny thing is without a trigger and if you give a vanilla waypoint to a unit to go inside the building it will open the door. What I am trying to do is to get two units on sentry waypoints inside the building follow with a get in waypoint and then a guard waypoint outside of the building. Yes the units get activated ie sentry waypoint they will enter the Titan get in waypoint ( walking tank platform from Tiberian Genesis mod) then it will move out of the building with the guard waypoint. The idea is to kill the units before they get into the Titan. Maybe a conflict with another mod I have in this mission IDK.

Share this post


Link to post
Share on other sites

Check your trigger (you can share it here), check the side of your units (captive ones are civilians...).... The solution is not far.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×