From cc29e774fee67fda00bf004dc2eeecb997713150 Mon Sep 17 00:00:00 2001 From: Bob Blackmon Date: Mon, 3 Apr 2017 09:56:06 -0400 Subject: Added OnZoneLoaded New hook for newly loaded zones. --- zone_example.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'zone_example.lua') 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) ]] -- cgit v1.2.3-70-g09d2