Page 1 of 1

Setting Spawn Points, Medic Tent, and Intel Locations

Posted: Sat Dec 01, 2012 7:27 am
by Bobby Lemain
Excuse my inability to figure this out but perhaps one of the older members can direct me and probably ever other aspiring map-maker.... how do you set these points in Voxed? Or is it something that needs to be in a script on the server?

Re: Setting Spawn Points, Medic Tent, and Intel Locations

Posted: Sun Dec 02, 2012 9:23 am
by GreaseMonkey
You can only do that in the pyspades .txt files that you include with your maps.

Re: Setting Spawn Points, Medic Tent, and Intel Locations

Posted: Sun Dec 02, 2012 6:58 pm
by Bobby Lemain
Thank you! I noticed this:
Code: Select all
name = 'De_Dust2'
version = '1.0'
author = 'SIMOX'
description = ('Your description here. ')
extensions = {
     'arena': True,
     'arena_blue_spawn' : (235, 310, 58),
     'arena_green_spawn' : (275, 180, 49),
     'arena_gates': ((268, 183, 47), (268, 184, 48), (283, 182, 46), (283, 182, 48), (236, 304, 54), (235, 304, 56), (232, 304, 55), (268, 179, 47), (283, 180, 47)),
     'water_damage' : 100
 }
But is there a list online or in the server code that tells us all the other call-outs? (Like medic tent placement, etc.)

Re: Setting Spawn Points, Medic Tent, and Intel Locations

Posted: Sun Dec 02, 2012 9:09 pm
by GreaseMonkey
You've read the config for an arena map. This is not going to work unless you're making an arena map.

There's a couple of functions you can define but I can't quite remember them, sorry. Who does?

Re: Setting Spawn Points, Medic Tent, and Intel Locations

Posted: Thu Dec 06, 2012 5:49 am
by Bobby Lemain
Found it.

For future reference:
Code: Select all
# script
from pyspades.constants import *
import random

def get_entity_location(team, entity_id):
    if entity_id == GREEN_FLAG:
        return (175, 256, 8)
    if entity_id == BLUE_FLAG:
        return (335, 256, 8)
    if entity_id == GREEN_BASE:
        return (180, 256, 8)
    if entity_id == BLUE_BASE:
        return (330, 256, 8)

def get_spawn_location(connection):
    if connection.team is connection.protocol.green_team:
        y = random.randrange(262,270)
        return (180, y, 60)
    if connection.team is connection.protocol.blue_team:
        y = random.randrange(262,270)
        return (330, y, 60)