Author Topic: [Tutorial] teamSPs  (Read 5179 times)

Offline fh_spitfire

  • Developer
  • ******
  • Posts: 421
  • FHer since 0.6 | aka spitfire05
    • View Profile
[Tutorial] teamSPs
« on: 19-05-2010, 14:05:13 »
This is a small tutorial for team-assigned spawnpoints plugin. I assume you have basic experience with working with mapdata.py.

#1 Import the plugin
Just like ony other plugin, you have to import 'teamSPs" in the beginning of your mapdata.py. Example:
Code: [Select]
from game.plugins import plugin, limitKit, teamSPsThis is how it should look if you're going to use kitlimits and teamSPs in your map (example).

#2 Configuration
Code: [Select]
spawns = [
    plugin(teamSPs, sps = ['spawnpoint1', 'spawnpoint2', 'spawnpoint3'], team = 1),
    plugin(teamSPs, sps = ['spawnpoint4', 'spawnpoint5', 'spawnpoint6'], team = 2),   
]
SpawnpointN is the spawnpoint template name, team defines the team that will be able to use this spawnpoint. Any spawnpoints not specified here will be available to both teams.

#3 Mount it to desired gamemode/mapsize
Just like any other plugin, for example:
Code: [Select]
gpm_cq = {
  64: kit_limits + spawns,
}

#4 The example
Look at Port en Bessin mapdata.py :)

Offline Wilhelm

  • FH-Betatester
  • ***
  • Posts: 596
  • Betatester
    • View Profile
Re: [Tutorial] teamSPs
« Reply #1 on: 19-05-2010, 20:05:43 »
Sticky?

Offline kettcar

  • Developer
  • ******
  • Posts: 605
  • Mapper / News Journalist
    • View Profile
    • SWIZZ Gamingnet Community
Re: [Tutorial] teamSPs
« Reply #2 on: 27-05-2010, 16:05:21 »
it works, it rocks

thx a lot  ;D

Offline kummitus

  • Jr. Member
  • **
  • Posts: 630
    • View Profile
    • CMP Gaming
Re: [Tutorial] teamSPs
« Reply #3 on: 02-02-2011, 15:02:12 »
Should teamSps specified with flag on flag basis or can you just bunch them up in one plugin thingy. This thread doesn't say anything about it and on port en bessin they are grouped
CMP Gaming

Offline fh_spitfire

  • Developer
  • ******
  • Posts: 421
  • FHer since 0.6 | aka spitfire05
    • View Profile
Re: [Tutorial] teamSPs
« Reply #4 on: 09-02-2011, 12:02:55 »
Should teamSps specified with flag on flag basis or can you just bunch them up in one plugin thingy. This thread doesn't say anything about it and on port en bessin they are grouped
You can bunch them up.

Offline kummitus

  • Jr. Member
  • **
  • Posts: 630
    • View Profile
    • CMP Gaming
Re: [Tutorial] teamSPs
« Reply #5 on: 13-02-2011, 19:02:35 »
Can you tell me what am doing wrong then? Just can't get this working.

Quote
from game.plugins import plugin, teamSPs

On top and then

Quote
spawns_64 = [
   plugin(teamSPs, sps = ['bunch of flagnames'], team = 1),
spawns_64 = [
   plugin(teamSPs, sps = ['bunch of flagnames'], team = 2),
]

gpm_cq = {
  64: spawns_64,
}

Just not getting it to work  ???
CMP Gaming

Offline phillip

  • Jr. Member
  • **
  • Posts: 349
    • View Profile
Re: [Tutorial] teamSPs
« Reply #6 on: 13-02-2011, 19:02:37 »
Can you tell me what am doing wrong then? Just can't get this working.

Quote
from game.plugins import plugin, teamSPs

On top and then

Quote
spawns_64 = [
   plugin(teamSPs, sps = ['bunch of flagnames'], team = 1),
spawns_64 = [
   plugin(teamSPs, sps = ['bunch of flagnames'], team = 2),
]

gpm_cq = {
  64: spawns_64,
}

Just not getting it to work  ???



From 1st post
Quote
spawns = [
    plugin(teamSPs, sps = ['spawnpoint1', 'spawnpoint2', 'spawnpoint3'], team = 1),
    plugin(teamSPs, sps = ['spawnpoint4', 'spawnpoint5', 'spawnpoint6'], team = 2),    
]


So I think that you should have
Quote
spawns_64 = [
   plugin(teamSPs, sps = ['spawnpointflag1_1','spawnpointflag1_2','spawnpointflag2_1'], team = 1),
   plugin(teamSPs, sps = ['spawnpointflag1_1','spawnpointflag1_2','spawnpointflag2_1'], team = 2),
]

Offline kummitus

  • Jr. Member
  • **
  • Posts: 630
    • View Profile
    • CMP Gaming
Re: [Tutorial] teamSPs
« Reply #7 on: 13-02-2011, 19:02:36 »
Meh, had it that way earlier but apparently had typo in it and now when I was looking after those typos it got that way screwed  :P
CMP Gaming