Hello. I'm new to AC. I've checked the forum and manual, but I didn't find a full answer to my question. How to interact with a custom script? There are two important questions to me:
1) How do I pass parameters to a custom method from an action list? I know I can call an event or send a message to call a method, but it only allows me to pass int parameters. Do I have to write a custom action to pass a bool variable?
2) How do I read public variables from my script? For example I have a Door script, that handles all of the stuff happennig when a player interacts with a door. Now I want to check public bool myDoor.isOpen from the action list. How do I do that?
                 
                
Comments
1) If you're just looking to pass a boolean, you could try sending "1" in place of True and "0" in place of False, and modifying the custom script to accept that as an alternative.
Another way, which would also allow for a wider range of variable types, would be to set a Global (game-wide) or Local (per-scene) variable before calling the function, and then having the custom script read that variable's value. Examples on reading and writing variables are found on the front page of the scripting guide and in Section 12.7 of the Manual.
2) You could write a custom Action that checks the value of your variable, but again it's probably easier to send the variable's value to either AC's Global or Local variables as an interim and check from there using the Variable: Check Action.