![]() |
triggeraction problem on gmaps
I'm trying to trigger an NPC on a gmap, but unless I am in the same 64x64 level as the NPC, it won't receive the trigger.
For example, If my character is at (20,20) on a 128x128 tile gmap, and the NPC I am sending a triggeraction to is at (70,20) it will not catch the trigger. However, if I move the NPC to (63,20) it will. I checked the x,y location of the trigger, and it matches the NPC's x,y on the gmap, so that's not the problem. Even if the NPC is 4 tiles away from me, but we happen to be right at the split between levels, it won't catch the trigger. I'm using a putnpc2(), so I could possibly just use findNPC( name ) and trigger it that way, but it would make my life a lot easier if triggeraction would work instead. I'm not quite sure why my location even matters, the NPC is triggering itself. |
Are the triggeraction's coordinates sent based on the gmap dimensions or level dimensions?
|
Quote:
|
Quote:
Fairly certain this won't work, but you could try finding out what 'name' on clientside equals, and if it's the same as serverside, try PHP Code:
PHP Code:
|
Quote:
I'll try getting the NPC's name and triggering it via a weapon though, and see if that works. Another thing: would sleepwhennoplayers=true/false have anything to do with it? I tested it but had no luck either. |
Clientside coordinates are based on the level not the gmap, because on clientside you don't always have the whole gmap loaded.
|
Quote:
I solved the problem by storing the NPC's name and using findNPC( name ) and triggering it that way. |
| All times are GMT +2. The time now is 11:23 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.