Forgotten Hope Public Forum
Forgotten Hope 2 => Modding => Topic started 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:
from game.plugins import plugin, limitKit, teamSPs
This is how it should look if you're going to use kitlimits and teamSPs in your map (example).
#2 Configuration
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:
gpm_cq = {
64: kit_limits + spawns,
}
#4 The example
Look at Port en Bessin mapdata.py :)
-
Sticky?
-
it works, it rocks
thx a lot ;D
-
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
-
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.
-
Can you tell me what am doing wrong then? Just can't get this working.
from game.plugins import plugin, teamSPs
On top and then
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 ???
-
Can you tell me what am doing wrong then? Just can't get this working.
from game.plugins import plugin, teamSPs
On top and then
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
spawns = [
plugin(teamSPs, sps = ['spawnpoint1', 'spawnpoint2', 'spawnpoint3'], team = 1),
plugin(teamSPs, sps = ['spawnpoint4', 'spawnpoint5', 'spawnpoint6'], team = 2),
]
So I think that you should have
spawns_64 = [
plugin(teamSPs, sps = ['spawnpointflag1_1','spawnpointflag1_2','spawnpointflag2_1'], team = 1),
plugin(teamSPs, sps = ['spawnpointflag1_1','spawnpointflag1_2','spawnpointflag2_1'], team = 2),
]
-
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