![]() |
Triggering a function
I am trying to trigger a function using level. vars like so:
*Npc1 PHP Code:
PHP Code:
But the function Tri() in the first npc, is not triggered. I tried doing level.test.trigger("Tri", nil); but still nothing. The reason i'm doing it this way is so I don't have to rely on doing triggeraction() in a specific x, y. This method works perfectly clientside...but I noticed npcs don't like being triggered this way serverside. :/ |
Did you change the function to onTri when you used trigger?
Try using this.level while you're at it, sometime GS2 is silly. |
Hah, I did forgot to change it to onTri when I used trigger. Thanks. :P
Still, i don't get why just triggering the function using level.test.Tri() wouldn't work...but, oh well. |
FYI trigger doesn't require a second parameter anymore on serverside (and clientside on v6).
|
It might have worked but whenever you call a public function on a level npc you have to trigger it to force update itself to players.
|
| All times are GMT +2. The time now is 03:58 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.