Jump to content
Mirek

[SOLVED] How to remove an default action?

Recommended Posts

I have a TIOW mission, where i am using some hangar doors "TIOW_Hangar_01_Door_closed" as decoration. Problem is they have an action to open, and i dont want the players to be able to open them. I tried  "ths removeaction 0" removeallactions this" and  i tried disabling simulation.  I found the action source:  rYG3Zh7.png but have no idea what to do with it.

 

 

Share this post


Link to post
Share on other sites

Maybe you can set the hangar as a static object or use the lock doors module to just lock the doors  :thumbsup:

  • Like 1

Share this post


Link to post
Share on other sites

Well, most probably you could get away with just replacing the statement variable with some empty string "". If I am not mistaken, this statement is what is called when one tries to execute the action. So, if you set it to an empty string nothing will happen.

 

Alternatively, you could try to delete the whole action (I believe this should be inside some scope - { ... }) which hopefully will just make it unavailable to the user(s) (plus the AI).

 

I haven't tested any of the two propositions, so please treat them with caution. Additionally, if you delete the action (or replace the statement variable) the action will be unavailable for all objects of the same type (those hangar doors of yours). If this is an issue then another solution is needed.

 

Please let us know if this helped or not, or if you have further questions.

Edited by ZaellixA
Corrected some expression
  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, ZaellixA said:

Well, most probably you could get away with just replacing the statement variable with some empty string "". If I am not mistaken, this statement is what is called when one tries to execute the action. So, if you set it to an empty string nothing will happen.

Better replace it with a hint that door is locked.

  • Like 1

Share this post


Link to post
Share on other sites

You can try something like:

inGameUISetEventHandler ["Action", "if (_this #0 isKindOf 'yourHangarTypeHere' && _this #4 == 'open door') then{ hint 'this door is locked'; true} else {false}"];

 

you need to replace yourHangarTypeHere by the type of your hangar (I don't know your mod). Something like Land_MilOffices_V1_F  .

You can find it by opening console and writing in one of the watch lines: typeOf cursorObject  after pointing the hangar in preview.

Mind for single quote (') and double quote (").

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
25 minutes ago, pierremgi said:

You can try something like:

inGameUISetEventHandler ["Action", "if (_this #0 isKindOf 'yourHangarTypeHere' && _this #4 == 'open door') then{ hint 'this door is locked'; true} else {false}"]; 

 

you need to replace yourHangarTypeHere by the type of your hangar (I don't know your mod). Something like Land_MilOffices_V1_F  .

You can find it by opening console and writing in one of the watch lines: typeOf cursorObject  after pointing the hangar in preview.

Mind for single quote (') and double quote (").

Absolutely amazing!  Thanks a million.

  • 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

×