ravebean

0905: toggle_door/set_door opcode in LUA?

Recommended Posts

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?

Share this post


Link to post
createObject
createColRectangle
moveObject

you can use that

Share this post


Link to post
moveObject

For what? I want disable swinging of original GTA SA door, which have "physic", not write other script for statistic object.

Share this post


Link to post
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 by ravebean
3g

Share this post


Link to post

set the elements collision to disabled, freeze then enable them.

Share this post


Link to post

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.

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.