Forgotten Hope Public Forum

Forgotten Hope 2 => Modding => Topic started by: fh_spitfire on 19-05-2010, 14:05:13

Title: [Tutorial] teamSPs
Post by: fh_spitfire 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 :)
Title: Re: [Tutorial] teamSPs
Post by: Wilhelm on 19-05-2010, 20:05:43
Sticky?
Title: Re: [Tutorial] teamSPs
Post by: kettcar on 27-05-2010, 16:05:21
it works, it rocks

thx a lot  ;D
Title: Re: [Tutorial] teamSPs
Post by: kummitus 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
Title: Re: [Tutorial] teamSPs
Post by: fh_spitfire 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.
Title: Re: [Tutorial] teamSPs
Post by: kummitus 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  ???
Title: Re: [Tutorial] teamSPs
Post by: phillip 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),
]
Title: Re: [Tutorial] teamSPs
Post by: kummitus 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