Jump to content

Get spawn points from a map [Race]


Overkillz

Recommended Posts

Hey guys, I want to do a script which allow the player to change his spawn point before the countdown.

It is for a race game mode "Deathmatch".

I just would like to know if there is a function to get spawn points from the map.

I have the script on my mind and shouldn't be hard to do it.

Thanks and Regards.

Link to comment
  
local aSpawnPoints = getElementsByType( "spawnpoint" ); 
  
for i, pSpawnPoint in ipairs( aSpawnPoints ) do 
    local fX, fY, fZ = tonumber( getElementData( pSpawnPoint, "posX" ) ), tonumber( getElementData( pSpawnPoint, "posY" ) ), tonumber( getElementData( pSpawnPoint, "posZ" ) ); 
  
    -- TODO 
end 
  

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...