abdalbaset Posted September 14, 2013 Share Posted September 14, 2013 how i can make marker moving me from place to another but only in main world this script buged fix it plez local Exitdoor = createMarker( 2290.9851, 2473.5014, 38.6875, "cylinder", 1.5, 150, 0, 0, 255 ) function Exitd( player ) if (source == Exitdoor) then if getElementType(player) == "player" then fadeCamera ( player, false, 1, 0, 0, 0 ) setTimer ( fadeCamera, 1000, 1, player, true, 1 ) setTimer ( setElementPosition, 1000, 1, player, 2306.4257, 2456.0712, 10.8203 ) setTimer ( setElementInterior, 1000, 1, player, 0, 2306.4257, 2456.0712, 10.8203 ) end end end addEventHandler ("onMarkerHit", getRootElement() ,Exitd ) local Doorentry = createMarker(2306.4257, 2456.0712, 10.8203, "cylinder", 1.5, 255, 0, 0, 255 ) function Doore( player ) if (source == Doorentry) then if getElementType(player) == "player" then fadeCamera ( player, false, 1, 0, 0, 0 ) setTimer ( fadeCamera, 1000, 1, player, true, 1 ) setTimer(setElementPosition, 1000, 1, player, 2290.9851, 2473.5014, 38.6875) setTimer ( setElementInterior, 1000, 1, player, 0, 2290.9851, 2473.5014, 38.6875 ) end end end addEventHandler ("onMarkerHit", getRootElement(), Doore ) Link to comment
Castillo Posted September 14, 2013 Share Posted September 14, 2013 What is the problem with that script? Link to comment
abdalbaset Posted September 15, 2013 Author Share Posted September 15, 2013 its moving me to this and i didnt want to go to intrior just move me to main world Link to comment
Castillo Posted September 15, 2013 Share Posted September 15, 2013 local Exitdoor = createMarker ( 2290.9851, 2473.5014, 38.6875, "cylinder", 1.5, 150, 0, 0, 255 ) function Exitd ( player ) if ( source == Exitdoor ) then if ( getElementType ( player ) == "player" ) then fadeCamera ( player, false, 1, 0, 0, 0 ) setTimer ( fadeCamera, 1000, 1, player, true, 1 ) setTimer ( setElementInterior, 1000, 1, player, 0, 2306.4257, 2456.0712, 10.8203 ) end end end addEventHandler ( "onMarkerHit", getRootElement() ,Exitd ) local Doorentry = createMarker ( 2306.4257, 2456.0712, 10.8203, "cylinder", 1.5, 255, 0, 0, 255 ) function Doore ( player ) if ( source == Doorentry ) then if ( getElementType ( player ) == "player" ) then fadeCamera ( player, false, 1, 0, 0, 0 ) setTimer ( fadeCamera, 1000, 1, player, true, 1 ) setTimer ( setElementInterior, 1000, 1, player, 0, 2290.9851, 2473.5014, 38.6875 ) end end end addEventHandler ( "onMarkerHit", getRootElement(), Doore ) Link to comment
abdalbaset Posted September 16, 2013 Author Share Posted September 16, 2013 its not working man now when i enter the marker its just make me back to the same marker its not going to the other one Link to comment
Castillo Posted September 16, 2013 Share Posted September 16, 2013 The thing is, I really don't get what are you trying to do. Link to comment
abdalbaset Posted September 17, 2013 Author Share Posted September 17, 2013 i am trying to make marker moving me from place in Main world(intrior 0) to another marker that is in main world too Link to comment
TAPL Posted September 17, 2013 Share Posted September 17, 2013 Then i don't see a point of using setElementInterior what you need is setElementPosition and the problem it back you again to the same marker is because you used same position of the other the marker so all you need is to use an position a bit far away of the marker. Link to comment
abdalbaset Posted September 19, 2013 Author Share Posted September 19, 2013 like that? local Exitdoor = createMarker ( 2349.1000976563, 2473.8999023438, 37.799999237061, "cylinder", 1.5, 150, 0, 0, 255 ) function Exitd ( player ) if ( source == Exitdoor ) then if ( getElementType ( player ) == "player" ) then fadeCamera ( player, false, 1, 0, 0, 0 ) setTimer ( fadeCamera, 1000, 1, player, true, 1 ) setTimer ( setElementPosition, 1000, 1, player, 0, 2297.1000976563,2427.8999023438,9.8999996185303 ) end end end addEventHandler ( "onMarkerHit", getRootElement() ,Exitd ) local Doorentry = createMarker ( 2297.1000976563, 2427.8999023438, 9.8999996185303, "cylinder", 1.5, 255, 0, 0, 255 ) function Doore ( player ) if ( source == Doorentry ) then if ( getElementType ( player ) == "player" ) then fadeCamera ( player, false, 1, 0, 0, 0 ) setTimer ( fadeCamera, 1000, 1, player, true, 1 ) setTimer ( setElementPosition, 1000, 2, player, 0,2349.1000976563,2473.8999023438, 37.799999237061 ) end end end addEventHandler ( "onMarkerHit", getRootElement(), Doore ) i have mistack idk where but its not working Link to comment
TAPL Posted September 19, 2013 Share Posted September 19, 2013 setElementPosition does not require interior argument so remove 0 and change the position to be a bit far away from the marker so it won't warp you back again. 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