Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-06-2009, 10:33 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
setlevel2 / onPlayerEnters issue

If you use setlevel2 to change a players level, and the player is already located in that level, all timeouts in attached ganis (obj.attr[#] = "gani" etc.) completely halt, and you're unable to reinitialize them since onPlayerEnters() will not be triggered by the warp (clientside nor serverside).

I worked around it by only changing x/y if the player is already in the destination level, but I find it to be a short term solution to a long term issue. Is there anything else I can use to reinitialize the timeout in the gani script?
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #2  
Old 02-06-2009, 10:59 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Call onPlayerEnters() manually?
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #3  
Old 02-06-2009, 11:14 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by LoneAngelIbesu View Post
Call onPlayerEnters() manually?
And just how do you propose I call the onPlayerEnters() function inside the attached gani from an external script? onPlayerEnters() isn't triggered serversided, clientsided, or clientsided in gani scripts automatically when you warp a player to the same level he's already in. I shouldn't have to work around it either way.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #4  
Old 02-07-2009, 12:11 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Check for the level before warping. If the player is already in the same level, just change their x and y...?
Reply With Quote
  #5  
Old 02-07-2009, 12:43 AM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by xXziroXx View Post
I shouldn't have to work around it either way.
Nobody ever should have to do anything that inconveniences them. What exactly is the problem with using your work-around?
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #6  
Old 02-07-2009, 12:50 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Crow View Post
Check for the level before warping. If the player is already in the same level, just change their x and y...?
You can redefine the setlevel2 function to do this (Do this in a player joined class for example). :]
__________________
Reply With Quote
  #7  
Old 02-07-2009, 02:05 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Crow View Post
Check for the level before warping. If the player is already in the same level, just change their x and y...?
Read my first post.

Quote:
Originally Posted by LoneAngelIbesu View Post
Nobody ever should have to do anything that inconveniences them. What exactly is the problem with using your work-around?
Quote:
Originally Posted by Chompy View Post
You can redefine the setlevel2 function to do this (Do this in a player joined class for example). :]
Yeah sure, let's fix everything on our own instead of bringing it to Stefan's attention so he can fix it instead. Geez guys, show some more enthusiasm, this is obviously something that should be looked into since it's affecting the onPlayerEnters() triggers in the engine.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #8  
Old 02-07-2009, 02:17 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by xXziroXx View Post
Read my first post.

Yeah sure, let's fix everything on our own instead of bringing it to Stefan's attention so he can fix it instead. Geez guys, show some more enthusiasm, this is obviously something that should be looked into since it's affecting the onPlayerEnters() triggers in the engine.
Ow, well. You know this won't be fixed within the next two years, though. Guess you gotta live with that workaround.
Reply With Quote
  #9  
Old 02-07-2009, 02:31 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Crow View Post
Ow, well. You know this won't be fixed within the next two years, though. Guess you gotta live with that workaround.
With that attitude it sure as hell wont. Damn, if you feel this way about Graal, just leave already, it's not like you're improving things with that attitude.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #10  
Old 02-07-2009, 02:38 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by xXziroXx View Post
With that attitude it sure as hell wont. Damn, if you feel this way about Graal, just leave already, it's not like you're improving things with that attitude.
Won't improve things with any other attitude anyway, I've already learned that over the years.
Reply With Quote
  #11  
Old 02-07-2009, 02:42 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Crow View Post
Won't improve things with any other attitude anyway, I've already learned that over the years.
Talk about lack of faith...
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #12  
Old 02-07-2009, 08:45 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by xXziroXx View Post
Yeah sure, let's fix everything on our own instead of bringing it to Stefan's attention so he can fix it instead. Geez guys, show some more enthusiasm, this is obviously something that should be looked into since it's affecting the onPlayerEnters() triggers in the engine.
Not to be argumentative, but the function name speaks for itself: it's called when a player enters a level, not when they move around in one.

If an engine doesn't do something exactly how you want it to, it's your job to find a way around that. Expecting the engine to be updated for your specific needs is fruitless.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #13  
Old 02-07-2009, 08:52 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by LoneAngelIbesu View Post
Not to be argumentative, but the function name speaks for itself: it's called when a player enters a level, not when they move around in one.

If an engine doesn't do something exactly how you want it to, it's your job to find a way around that. Expecting the engine to be updated for your specific needs is fruitless.
That would be fine and all, if it weren't killing all attached ganis timeouts, which classifies it as a bug.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #14  
Old 02-07-2009, 10:30 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by xXziroXx View Post
That would be fine and all, if it weren't killing all attached ganis timeouts, which classifies it as a bug.
Barely. But, fine. You win.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #15  
Old 02-13-2009, 07:38 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
I've not experienced this problem set, does it also happen with the trading card effects and pets?
Reply With Quote
  #16  
Old 02-13-2009, 07:44 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Stefan View Post
I've not experienced this problem set, does it also happen with the trading card effects and pets?
I would debug it, but I don't have any cards at all, and buying them just to debug this sounds a bit too excessive even for me.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:24 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.