ravebean Posted November 10, 2018 Share Posted November 10, 2018 Hi, it is possible to use GTA SA opcode 0905(set door object to close, or open) in LUA script? Or how can I create door object(by script), and get possibility to continue script by add options for set this door closeable, or set this door openable? Link to comment
Dimos7 Posted November 10, 2018 Share Posted November 10, 2018 createObject createColRectangle moveObject you can use that Link to comment
ravebean Posted November 11, 2018 Author Share Posted November 11, 2018 moveObject For what? I want disable swinging of original GTA SA door, which have "physic", not write other script for statistic object. Link to comment
Captain Cody Posted November 11, 2018 Share Posted November 11, 2018 https://wiki.multitheftauto.com/wiki/SetElementFrozen Will freeze the door entirely. Link to comment
ravebean Posted November 11, 2018 Author Share Posted November 11, 2018 (edited) 45 minutes ago, CodyJ(L) said: https://wiki.multitheftauto.com/wiki/SetElementFrozen Will freeze the door entirely. I saw that yesterday, but I fear this can freeze door in other than closed position. If so, I would need code to check door rotation, but I don't know how dynamic object "swingdoor" is seen by game (does it know present rotation angle of this object). I know it's possible to do with "lockdoor" object(player can't open this door, door are open only when player get to interior(in SP)), because I saw that on some server, where player can buy apartment, and lock or unlock door(interior isn't in heaven like normal intriors, just in normal SA world). Edited November 11, 2018 by ravebean 3g Link to comment
Captain Cody Posted November 11, 2018 Share Posted November 11, 2018 set the elements collision to disabled, freeze then enable them. Link to comment
Addlibs Posted November 11, 2018 Share Posted November 11, 2018 If I recall correctly, setElementFrozen will immediately reset the door's rotation to closed position so you don't have to worry about it freezing in the wrong rotation. Link to comment
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