name = 'SMASH FORTS'
version = '1.0'
author = 'Jason Bonham AKA JoJoe Stinky CC 2012'
description = 'smashforts is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License'
from pyspades.constants import *
from pyspades.server import ServerConnection
def get_entity_location(team, entity_id):
if entity_id == BLUE_FLAG:
z = team.protocol.map.get_z(0, 0)
return (0, 0, z)
if entity_id == GREEN_FLAG:
z = team.protocol.map.get_z(0, 0)
return (0, 0, z)
if entity_id == BLUE_BASE:
z = team.protocol.map.get_z(0, 0)
return (0, 0, z)
if entity_id == GREEN_BASE:
z = team.protocol.map.get_z(0, 0)
return (0, 0, z)
def get_spawn_location(connection):
if connection.team is connection.protocol.blue_team:
return (236, 150, 40)
if connection.team is connection.protocol.green_team:
return (236, 380, 40)
jojoestinky wrote:That seems to work pretty good :)
import random
name = 'BestMap2' version = '1.0' author = 'mat^2' description = 'BEST MAP EVER'
# this allows setting up spawns inside buildings etc. even for maps where # building/destruction is allowed
# example spawns spawn_locations_blue = [ (337, 171, 44), (337, 171, 44) ]
spawn_locations_green = [ (176, 339, 48), (176, 339, 48) ]
def get_spawn_location(connection): if connection.team is connection.protocol.blue_team: x, y, z = random.choice(spawn_locations_blue) elif connection.team is connection.protocol.green_team: x, y, z = random.choice(spawn_locations_green) z -= 2.4 # magic numbers x += 0.5 y += 0.5 if connection.protocol.map.get_z(x, y) <= z: # allows spawning lower if the ground is destroyed return x, y, z else: return x, y, connection.protocol.map.get_z(x, y)
Dany0 wrote:We sent him that one when we made the example, he did something wrong and couldn't get it to work. Then blamed the script.
Users browsing this forum: No registered users and 0 guests