Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- opendoor1 = createObject(1967, -2035.0999755859, 1645.0999755859, 233, 0, 0, 270)
- markerdoor = createMarker( -2037, 1644.6999511719, 231.80000305176, "corona", 6.0,0,0,0,0 )
- function MarkerHit( hitElement, matchingDimension )
- if getElementType(hitElement) ~= "player" then return end -- checking who came in marker is player
- moveObject(opendoor1,300,-2032.8000488281,1645.0999755859,233) -- here is x,y,z the door moves
- end
- addEventHandler( "onMarkerHit", markerdoor, MarkerHit )
- function markerLeave( leaveElement, matchingDimension )
- for _, p in ipairs(getElementsByType('player')) do
- if isElementWithinMarker(p, markerdoor ) then
- return
- end
- end
- moveObject(opendoor1,300,-2035.0999755859, 1645.0999755859, 233)
- end
- addEventHandler( "onMarkerLeave", markerdoor, markerLeave )
Add Comment
Please, Sign In to add comment