You simply add the necessary lines with notepad. You might need to get some coordinate info via voxed but it's not really very difficult. Let's take a peek at my Black Widow map's config text:
- Code: Select all
name = 'Black Widow'
version = '1.0'
author = 'Buffet of Lies'
description = 'Map by Buffet_of_Lies for AoS'
extensions = { 'water_damage' : 5 }
# scripting
from pyspades.constants import *
from pyspades.server import ServerConnection
def get_entity_location(team, entity_id):
if entity_id == BLUE_FLAG:
# puts only the blue flag in the corner
# you can also use GREEN_FLAG, BLUE_BASE, and GREEN_BASE as entity locations
z = team.protocol.map.get_z(0, 0)
return (0, 0, z)
def get_spawn_location(connection):
if connection.name == 'Buffet_of_Lies':
# put players with the name "Buffet_of_Lies"
# into the sky
x, y, z = ServerConnection.get_spawn_location(connection)
return (x, y, 30)
#to set spawn for a specific team, do the following:
if connection.team is connection.protocol.blue_team:
#sets a static spawn for just the blue team, but you could use "green_team" too.
#set_location_safe tries to keep the player outside of walls.
x, y, z = ServerConnection.get_spawn_location(connection)
return ServerConnection.set_location_safe(connection, (110, 110, 50))
See where it says "entity design == BLUE_FLAG" or GREEN_BASE? You can just change and add lines to those. You seem to be able to just tack it onto the end of map's config file. See where it says "get_spawn_location"? See how it says it is spawning the blue team at coordinates 110, 110, 50? If you were to add another line that said "if connection.team is connection.protocol.green_team:" then you could dpecify a new set of coords for the green team!