Overkillz Posted October 23, 2015 Posted October 23, 2015 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.
Kenix Posted October 24, 2015 Posted October 24, 2015 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
Dealman Posted October 25, 2015 Posted October 25, 2015 You can read more about this on the Wiki page; Writing Gamemodes
Overkillz Posted October 26, 2015 Author Posted October 26, 2015 Thanks guys, specially to Kenix. Now I only need to use a setElementPosition and somethings more and will be enought, thanks guys
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