From Fortress Forever Wiki
Jump to navigationJump to search
|
|
| Line 1: |
Line 1: |
| − | Called by a spawn point. Return true/false to determine whether the player can spawn at the spawn point
| + | #REDIRECT [[Lua:validspawn]] |
| − | | |
| − | ===Usage===
| |
| − | function info_ff_teamspawn:validspawn(ffspawn, player)
| |
| − | ...
| |
| − | end
| |
| − | | |
| − | ===Example===
| |
| − | This is also an example of an inline function. Since this validspawn function is so simple, it's convenient to declare it right inside the new class of teamspawn.
| |
| − | <pre>attacker_spawn = info_ff_teamspawn:new({ validspawn = function(self,player)
| |
| − | return player:GetTeamId() == attackers
| |
| − | end })
| |
| − | | |
| − | defender_spawn = info_ff_teamspawn:new({ validspawn = function(self,player)
| |
| − | return player:GetTeamId() == defenders
| |
| − | end })</pre>
| |
| − | [[Category:Lua_Callbacks]] | |
Latest revision as of 20:55, 12 May 2009