Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Bug Report
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 06-23-2009, 10:15 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
onwater2 not working

I have the following script running:
PHP Code:
  if (horsecheck == true) {
    
wall[0] = onwater2(player.x+check[k][0][0],player.y+check[k][0][1],check[k][2][0],check[k][2][1]);
    
wall[1] = onwater2(player.x+check[k][1][0],player.y+check[k][1][1],check[k][2][0],check[k][2][1]);
  } else {
    
wall[0] = onwall2(player.x+check[k][0][0],player.y+check[k][0][1],check[k][2][0],check[k][2][1]);
    
wall[1] = onwall2(player.x+check[k][1][0],player.y+check[k][1][1],check[k][2][0],check[k][2][1]);
  } 
Basically, if the player is riding a horse it will check for water, and if not it will check for a wall.

They both use the exact same checks. With wall checking, the detection is perfect. However, if I start trying to detect water, half the time the player will go halfway into the body of water and such. It seems to have a slight delay in actually registering water.

This is clientside, by the way. Can this please be fixed?

edit: after some testing, onwater2(x,y,1,1) will only check a one pixel area for water, NOT 1 tile, like onwall2. HOWEVER, onwater2(x,y,2,2) functions the same as onwall2(x,y,1,1)... so I don't know what the hell is going on.

Here's in the script I used to test:
PHP Code:
  showpoly(200,{mousex-1,mousey,mousex-1+1,mousey,mousex-1+1,mousey+1,mousex-1,mousey+1});
  
changeimgcolors(200,1,0,0,.25);
  
showpoly(201,{mousex,mousey,mousex+1,mousey,mousex+1,mousey+1,mousex,mousey+1});
  
changeimgcolors(201,0,1,0,.25);
  
player.chat onwater2(mousex-1,mousey,1,1SPC onwall2(mousex,mousey,1,1); 

Red box represents my water check, and the green is the wall check. Both are identical, except one returns true(the onwall2) and one does not -- these results are also shown over the player's head, left is the water check and right is the wall.

Last edited by DustyPorViva; 06-23-2009 at 10:42 AM..
Reply With Quote
  #2  
Old 06-27-2009, 05:11 PM
Robin Robin is offline
The secret of NIMH
Robin's Avatar
Join Date: Apr 2005
Location: Wales, UK
Posts: 515
Robin will become famous soon enough
Send a message via AIM to Robin
Does it work in the bigger areas?
__________________

Reply With Quote
  #3  
Old 08-20-2009, 07:06 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by Robin View Post
Does it work in the bigger areas?
Don't know what you mean. All I know is it doesn't work like it should.

Stefan, could this be fixed please? I don't want to rewrite a WHOLE movement system to accommodate for a bug.
Reply With Quote
  #4  
Old 08-20-2009, 07:46 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by DustyPorViva View Post
Don't know what you mean. All I know is it doesn't work like it should.

Stefan, could this be fixed please? I don't want to rewrite a WHOLE movement system to accommodate for a bug.
I've never trusted the onwall2 or onwater2 functions, but

For now anyway, maybe just use a solution like the following?

PHP Code:
function onwater3(txtywh) {
  if (
== 12;
  if (
== 12;
  return 
onwater2(txtywh);

Edit: I see that you might be using more than just 1 tile checks.
__________________
Quote:
Reply With Quote
  #5  
Old 08-20-2009, 07:59 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
onwall2 is fine, you just have to be aware of Graal's polygon calculation bug, since onwall2 seems to use the same code. Not sure about onwater2 though, but I can't image why it wouldn't function properly. I will give it a go soon.
__________________
Reply With Quote
  #6  
Old 08-22-2009, 07:11 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
please fix! thank you
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:26 AM.


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