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 03-27-2014, 03:39 PM
Starfire2001 Starfire2001 is offline
Unholy Nation
Starfire2001's Avatar
Join Date: Dec 2010
Location: The streets.
Posts: 156
Starfire2001 will become famous soon enough
Hide under bush bug?

When a player hides under a bush and then changes levels, they become invisible to other players. If a player is hidden under a bush and another player walks into that level, the player hidden under the bush is invisible to then.

The issue seems to be that the players ani isn't being properly set on the serverside. When a player is hidden on a bush, their ani is still "carry" or "carrystill" serverside, while clientside it is "hidden" or "hiddenstill". The following script fixed the problem.

PHP Code:
function onActionServerside() {
  if(
params[0] == "fixhidden") {
    
// Ensure the players gani is changed even after fix applied
    
player.ani "hidden";
    
player.ani "hiddenstill";
  }elseif(
params[0] == "checkhidden") {
    
// Need to do with all players in level, otherwise if a player
    // enters a level where someone is already hiding under a bush,
    // they won't be able to see that player.
    
for(temp.pl:players) {
      
pl.triggerclient("gui",this.name,"checkhidden");
    }
  }
}


//#CLIENTSIDE
function onPlayerEnters(){
  
triggerserver("gui",this.name,"checkhidden");
}

function 
onActionClientside() {
  if(
params[0] == "checkhidden") {
    
// Gani is recognized properly clientisde
    
if(player.ani == "hidden" || player.ani == "hiddenstill") {
      
triggerserver("gui",this.name,"fixhidden");
    }
  }

I'm wondering if this is just a problem on UN or if it is a problem everywhere.
__________________
-Ph8
Reply With Quote
  #2  
Old 03-27-2014, 06:26 PM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 353
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
i imagine its a synchronisation problem that came with the latest server update. the hidden gani is probably being synchronised to other players clients onPlayerEnters while the carryitem is not, and if you update their gani serverside that is probably forcing the carryitem to synchronise to other clients

as the hidden ganis can also use attr[3] you could possibly try messing around with something like:

PHP Code:
//#CLIENTSIDE
function onPlayerEnters(){
  if(!
player.ani.name.starts("hidden"))
    return;

  if(
carriesbush){
    
player.attr[3] = "bush.png";
    return;
  }
  if(
carriesrock){
    
player.attr[3] = "rock.png";
    return;
  }
  if(
carriesbomb){
    
player.attr[3] = "bomb.png";
    return;
  }
  
//etc

__________________
This signature has been deleted by Darlene159.
Reply With Quote
  #3  
Old 03-29-2014, 11:39 AM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 353
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
have you checked whether this could be a problem with the new client for mac users?

it could also be a problem caused by windows/linux & mac users having the different client version, there were some synchronisation bugs when people were able to use either v5 or v6
__________________
This signature has been deleted by Darlene159.
Reply With Quote
  #4  
Old 05-20-2014, 09:55 AM
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
Are those ganis existing on the server (/find) ?
Reply With Quote
  #5  
Old 05-20-2014, 02:50 PM
Starfire2001 Starfire2001 is offline
Unholy Nation
Starfire2001's Avatar
Join Date: Dec 2010
Location: The streets.
Posts: 156
Starfire2001 will become famous soon enough
Quote:
Originally Posted by Stefan View Post
Are those ganis existing on the server (/find) ?
Default game file(s) found (relative to levels/, max 50 files):
mainfiles/ganis/hidden.gani: downloadable, 301 byte, 2001-11-26 11:35:24
Default game file(s) found (relative to levels/, max 50 files):
mainfiles/ganis/hiddenstill.gani: downloadable, 248 byte, 2001-11-26 11:35:24
__________________
-Ph8
Reply With Quote
  #6  
Old 06-12-2014, 04:15 AM
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 was asking because the default files were not accessible on Unholy Nation some weeks ago. This problem still happens?
Reply With Quote
  #7  
Old 06-12-2014, 05:50 AM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 353
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
does this mean that the bush image is no longer grabbed from sprites.png but rather the tileset?
__________________
This signature has been deleted by Darlene159.
Reply With Quote
  #8  
Old 06-12-2014, 03:34 PM
Starfire2001 Starfire2001 is offline
Unholy Nation
Starfire2001's Avatar
Join Date: Dec 2010
Location: The streets.
Posts: 156
Starfire2001 will become famous soon enough
I had a weapon in place that was dealing with the issue, just removed that weapon and it seems now that the problem is indeed fixed, so thanks.
__________________
-Ph8
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 12:52 PM.


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