aunque Posted November 20, 2022 Share Posted November 20, 2022 I'm new to Lua and I want it to freeze when a marker arrives and unfreeze after 3 seconds. How can I do that? can you write sample code. Link to comment
Shady1 Posted November 20, 2022 Share Posted November 20, 2022 hello @aunque welcome to the forum i edited some sample code for you. local theMarker = createMarker(0, 0, 2, "cylinder", 5, 255, 0, 0, 255) -- create marker on 0,0,2 coordinates addEventHandler("onMarkerHit", theMarker, function(hitElement, matchingDimension) setElementFrozen(hitElement, true) -- freeze element setTimer(function(hitElement) setElementFrozen(hitElement, false), end, 3000, 1, hitElement) --release after 3 seconds end ) Link to comment
aunque Posted November 20, 2022 Author Share Posted November 20, 2022 Thank you very much Link to comment
Shady1 Posted November 20, 2022 Share Posted November 20, 2022 1 hour ago, aunque said: Thank you very much if it works you can like the comment 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