diff options
| author | Bob Blackmon <bob.blackmon@ymail.com> | 2017-04-03 09:56:06 -0400 |
|---|---|---|
| committer | Bob Blackmon <bob.blackmon@ymail.com> | 2017-04-03 09:56:06 -0400 |
| commit | cc29e774fee67fda00bf004dc2eeecb997713150 (patch) | |
| tree | 7c17eb389fe5714828d5ee153632b345a796f7e4 /zone_example.lua | |
| parent | 49e018aee0b82e805660e819d7b7647d8ac9c07c (diff) | |
| download | zones-cc29e774fee67fda00bf004dc2eeecb997713150.tar.gz zones-cc29e774fee67fda00bf004dc2eeecb997713150.tar.bz2 zones-cc29e774fee67fda00bf004dc2eeecb997713150.zip | |
Added OnZoneLoaded
New hook for newly loaded zones.
Diffstat (limited to 'zone_example.lua')
| -rw-r--r-- | zone_example.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/zone_example.lua b/zone_example.lua index 737c706..c2540ca 100644 --- a/zone_example.lua +++ b/zone_example.lua @@ -144,5 +144,17 @@ end) zone.onlyIfShes = "5'3\"" end end) + + -- Example of the OnZoneLoaded hook. + -- This hook is called as a zone is loaded into the game, typically on map startup. Only called serverside. + -- Arguments are: + -- zone - The full zone table of the zone we are editing. + -- class - The class of the zone. + -- zoneID - The ID of the zone. + hook.Add("OnZoneLoaded","hookname_unique",function(zone,class,zoneID) + if class == "Baby Got Back" then --always check class. + zone.owner = Entity(1) + end + end) ]] |
