Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-30-2013, 05:22 AM
devilsknite1 devilsknite1 is offline
C:
devilsknite1's Avatar
Join Date: Jul 2006
Location: Florida, USA
Posts: 269
devilsknite1 has a spectacular aura about
Send a message via AIM to devilsknite1 Send a message via MSN to devilsknite1 Send a message via Yahoo to devilsknite1
onPlayerLeaves on clientside?

Obviously the onPlayerLeaves() function is not accessible on clientside, so is there some way to replicate this on the clientside? I created a GUI on the clientside in a class and want a way to remove it when the player leaves the level. Any ideas?
Reply With Quote
  #2  
Old 01-30-2013, 07:45 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
Use onPlayerEnters() instead. It fires when a player enters a level, so basically when the previous one is left. Check for/save the level name if you need more accurate checks.
Reply With Quote
  #3  
Old 01-30-2013, 08:34 AM
devilsknite1 devilsknite1 is offline
C:
devilsknite1's Avatar
Join Date: Jul 2006
Location: Florida, USA
Posts: 269
devilsknite1 has a spectacular aura about
Send a message via AIM to devilsknite1 Send a message via MSN to devilsknite1 Send a message via Yahoo to devilsknite1
That's possible, but it wouldn't be able to [easily] kill the GUI and would have to be put in every single level, considering the player could potentially reach any level after having the class' GUI activated in the level it stands in.
The class creates a button on the screen, so it's not like it can simply be closed out of, and like I stated previously, if onPlayerEnters() were to be used, it would have to be placed in every level and would make it far more difficult to destroy the GUI after the player leaves said level.
Reply With Quote
  #4  
Old 01-30-2013, 11:38 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
onPlayerEnters() is not restricted to level NPCs. Put it in a weapon, or wherever your button is being created.
Reply With Quote
  #5  
Old 01-30-2013, 06:04 PM
devilsknite1 devilsknite1 is offline
C:
devilsknite1's Avatar
Join Date: Jul 2006
Location: Florida, USA
Posts: 269
devilsknite1 has a spectacular aura about
Send a message via AIM to devilsknite1 Send a message via MSN to devilsknite1 Send a message via Yahoo to devilsknite1
Hm, ok so I can just define onPlayerEnters() and exclude the level it's being created in? Interesting, thanks! Sorry, didn't think about that!
Reply With Quote
Reply


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 04:55 AM.


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