![]() |
screenx/y() bug?
Ok. I'm trying to use screenx(x,y) & screeny(x,y) to display 3 images above an npc precisely (pixel-wise), and i'm experiencing 2 problems.
1) It doesn't work serverside 2) It returns negative values, even when the x/y I specified is clearly in my screen range. Im also using setshape2 if it matters. EDIT: strange, it only shows it incorrectly when its used in the if created event, I used it in a timeout loop & the numbers were correct @_@. |
Re: screenx/y() bug?
Quote:
|
Hey guy, why not just use a complimentary gani? Like the stuff over the guy's head in the tutorial.
|
Uhm, why use screenx/y for exact displaying of stuff?
|
Quote:
I'd edit the post, but I can't. |
It is always fun to give some code illustrating the problem.
|
Quote:
Example of bug: if (created){ setimg block.png; setcharprop #c,#v(screenx(x+3,y)) - #v(screeny(x,y)); } Example of it working: if (created) { timeout=.05; } if (timeout){ setimg block.png; setcharprop #c,#v(screenx(x+3,y)) - #v(screeny(x,y)); timeout=.05; } |
It is because Graal takes a minute (well, .05 seconds to be percise) to load the screenx\y variables.
Try the code to test my theory NPC Code: |
Quote:
|
| All times are GMT +2. The time now is 01:53 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.