Jump to content

Get spawn points from a map [Race]


Overkillz

Recommended Posts

Posted

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.

Posted
  
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 
  

http://vk.com/the_kenix

Вопросы задавайте на форуме, не пишите мне в личку.

Please don't pm me.

Posted

You can read more about this on the Wiki page; Writing Gamemodes

If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.

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