Jump to content

[Question] 2 markers in the same interior?


kieran

Recommended Posts

Hello, I have just made an interior but I was wondering if you could set 2 markers within the same interior, basically I want to warp my guy from one bit of my interior to another on a marker hit. :) This is what I got so far:

one_marker = createMarker(126.9833984375, 407.57830810547, 893.24072265625, "arrow", 0.8, 255, 255, 0, 170 )
two_marker = createMarker(127.30000305176, 386, 859.20001220703, "arrow", 0.8, 255, 255, 0, 170 ) 
setElementInterior(one_marker, 2, 126.9833984375, 407.57830810547, 893.24072265625)
setElementInterior(two_marker, 2, 127.30000305176, 386, 859.20001220703)


function int_test(player)
    if (source == one_marker and getElementType(player) == "player") then
        setElementInterior(player, 2, 127.30000305176, 388, 859.20001220703)
        setElementFrozen(player,false)
        setTimer(setElementFrozen, 1000, 1, player, false)
    elseif (source == two_marker and getElementType(player) == "player") then
        setElementInterior(player, 2, 126.30000305176, 407.60000610352, 892.40002441406)
        setElementFrozen(player,false)
        setTimer(setElementFrozen, 1000, 1, player, false)
    end
end

addEventHandler("onMarkerHit", root, int_test)

The markers are there but do nothing when I hit them, I sort of figured out it's because you can't send yourself to the same interior, but I thought I'd post just to see if there is a way. :D 

Link to comment

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.
×
×
  • Create New...