Jump to content
DamianBope

open/close Bar-Gate editor

Recommended Posts

script for opening the bar gate. this bar gate is placed in the map. once had an object id script to open the bar gate. but can't find it anymore, it was something with nearestobject! can someone help me

 

Bar-Gate object picture

  • Like 1

Share this post


Link to post
Share on other sites

Hide it with a module, put the bargate from the editor in it's place for which you can find code easily 🙂

 

Probably not the answer you were looking for and cuz imma a nub, probably not the best advice, but it should work until someone comes in with a better solution 🙂

  • Like 1

Share this post


Link to post
Share on other sites

Depending on your map... DYA?

You can add a squared trigger centered on your bargate and choose a condition like BLUFOR present, repeatable.

Your bargate could be identified by: nearestTerrainObjects command type "house" (probably) from this trigger, so something like:

yourBarGate = (nearestTerrainObjects [getPos thisTrigger, ["house"],20,true,true]) select 0

 

Note: you can name the trigger or use thisTrigger (as above), specific variable working inside the trigger's fields.

After that you can open close the bargate with a little anim code. See this post. I can't say your bargate is this class name but you can check that in preview mode, pointing at the bargate and asking for : typeOf cursorObject in one of the four watch lines (esc to debug console).

  • 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

×