Helik Posted August 1, 2017 Share Posted August 1, 2017 In the video just released we saw that there was a button with a getState(), but not the door. Every item in the game should have a getState() function. Also every item should have tags and a list so I can do something like "close all exterior doors of the ship", "is there any door open?", etc. Regards. ATMLVE, Mazillus, Lethys and 2 others 5 Link to comment Share on other sites More sharing options...
Lethys Posted August 1, 2017 Share Posted August 1, 2017 Why need that getstate for a door? It's either open or closed. I'm no programmer but isn't it faster and better just to close all doors when armosphere<0,5 instead of asking what state each door is in, then closing those open ones when atmosphere<0,5 ? Makes more sense to me.... Link to comment Share on other sites More sharing options...
Helik Posted August 1, 2017 Author Share Posted August 1, 2017 Well, to feed a minimap of your ship on some control screen, for example. But there is many other uses. Morand and Mawbotch 2 Link to comment Share on other sites More sharing options...
Lethys Posted August 1, 2017 Share Posted August 1, 2017 3 minutes ago, Helik said: Well, to feed a minimap of your ship on some control screen, for example. But there is many other uses. Ah yeah, makes sense. +1 Mawbotch 1 Link to comment Share on other sites More sharing options...
ATMLVE Posted August 1, 2017 Share Posted August 1, 2017 Also if you want the state of the door to affect things. You could have a bunch of lights turn on while a door is open, set off an alarm, etc. I totally agree, every object in the game that has states (of they can be on or off, that counts) needs to have a function to get it's current state. Link to comment Share on other sites More sharing options...
Kael Posted August 1, 2017 Share Posted August 1, 2017 This also helps if you want to script an airlock/security system. Check to see if the outer door is closed and only trusted people are in the airlock before the second door is opened Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now