Forgotten Hope 2 > Modding

[Tutorial] teamSPs

(1/2) > >>

fh_spitfire:
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: ---from game.plugins import plugin, limitKit, teamSPs
--- End code ---
This is how it should look if you're going to use kitlimits and teamSPs in your map (example).

#2 Configuration

--- Code: ---spawns = [
    plugin(teamSPs, sps = ['spawnpoint1', 'spawnpoint2', 'spawnpoint3'], team = 1),
    plugin(teamSPs, sps = ['spawnpoint4', 'spawnpoint5', 'spawnpoint6'], team = 2),   
]
--- End code ---
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: ---gpm_cq = {
  64: kit_limits + spawns,
}
--- End code ---

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

Wilhelm:
Sticky?

kettcar:
it works, it rocks

thx a lot  ;D

kummitus:
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

fh_spitfire:

--- Quote from: 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

--- End quote ---
You can bunch them up.

Navigation

[0] Message Index

[#] Next page

Go to full version