Issue with registerRegion

Post Reply
bluesolarflare
Posts: 129
Joined: Wed May 27, 2015 4:23 pm

Issue with registerRegion

Post by bluesolarflare » Thu Nov 10, 2016 7:16 pm

Hello,

I am trying to setup Salvage on my server and I am coding Bhaflau Remnants at the moment. I am trying to get the teleporter to work on the first floor to take players up to the second floor. I already have the event ID that causes the warp to the proper floor, however, I am trying to get registerRegion to work. Below is my code that I have

Code: Select all

-----------------------------------
--  onInitialize
-----------------------------------

function onInitialize(zone)
	zone:registerRegion(1,336.711,-1,-416.384,343.571,-1,-423.319); -- First Floor Teleporter

end;


-----------------------------------
-- onRegionEnter          
-----------------------------------

function onRegionEnter(player,region)
	 
	 if(region:GetRegionID() == 1) then
			player:startEvent(0x00d1); 
         end
end;

When I get to the teleporter at 339, -1, -420, nothing happens. I have even tried inputing a print to player so it prints something to the console so I know it is working, but nothing happens. Any help would be greatly appreciated. Thanks.


bluesolarflare
Posts: 129
Joined: Wed May 27, 2015 4:23 pm

Re: Issue with registerRegion

Post by bluesolarflare » Fri Nov 11, 2016 11:38 am

Thanks,

I moved to using a single point and a radius. At first my radius was too large but I got it working now.

sekigah
Posts: 13
Joined: Fri Aug 12, 2016 2:02 pm

Re: Issue with registerRegion

Post by sekigah » Tue Nov 22, 2016 1:57 pm

Interested in getting this up and running. Let me know if you want to collab.

bluesolarflare
Posts: 129
Joined: Wed May 27, 2015 4:23 pm

Re: Issue with registerRegion

Post by bluesolarflare » Mon Dec 12, 2016 7:25 pm

sekigah wrote:Interested in getting this up and running. Let me know if you want to collab.
I can PM you all of the region's and event IDs for floor warps when I finally get around to finishing the project.

Post Reply