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 07-16-2010, 11:28 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
player.hearts

I'm trying to update this serverside- but it won't o-o
I'm using a custom GUI, so I'm using this to heal the player

HTML Code:
public function onHealPlayer(amount) {
  player.hearts += temp.amount;
  triggerclient("weapon", "-Player/HUD", "updateHP", player.hearts);
}
Once it's updated, it'll call the HUD to update. However, on the serverside it shows the HP changing without a problem, but when I go on the clientside it's staying at the old value, not the new one!
Anyone have any reasons why?
I tried it with the default system, but no fix x-x (still updated on the serverside, not the clientside)
__________________
Reply With Quote
  #2  
Old 07-16-2010, 12:42 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
If you're using player.hearts you shouldn't have to manually sync those clientside and serverside.. at least I don't think so.
__________________
Reply With Quote
  #3  
Old 07-16-2010, 01:07 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
I'm using a default HUD
__________________
Reply With Quote
  #4  
Old 07-16-2010, 01:12 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by xAndrewx View Post
I'm trying to update this serverside- but it won't o-o
I'm using a custom GUI, so I'm using this to heal the player

HTML Code:
public function onHealPlayer(amount) {
  player.hearts += temp.amount;
  triggerclient("weapon", "-Player/HUD", "updateHP", player.hearts);
}
Once it's updated, it'll call the HUD to update. However, on the serverside it shows the HP changing without a problem, but when I go on the clientside it's staying at the old value, not the new one!
Anyone have any reasons why?
I tried it with the default system, but no fix x-x (still updated on the serverside, not the clientside)
Hm yeah the player.hearts variable is definately synced and should not require manual update, but assuming the HUD is relying on a trigger to update the display my only guess based on this would be the lack of "player." before triggerclient();.
Reply With Quote
  #5  
Old 07-16-2010, 01:15 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Strange- I'm testing it now and even when I add player.hearts++ to a weapon it won't call it o-o

Infact, I can't even heal the player now... lol
It seems to be ok when I remove the players hearts, but when I add them it wont add.
__________________

Last edited by xAndrewx; 07-16-2010 at 01:32 PM..
Reply With Quote
  #6  
Old 07-16-2010, 01:33 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
fixed it by resetting my player =O


However, if my ap is < 50 it won't heal... lol is that normal for classic o-o

It's an engine problem, thanks guys
http://forums.graalonline.com/forums...89#post1587889
__________________

Last edited by xAndrewx; 07-16-2010 at 02:24 PM..
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 12:25 AM.


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