Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   canmove blocking timeouts and vice versa (https://forums.graalonline.com/forums/showthread.php?t=78126)

Crow 12-29-2007 10:55 PM

canmove blocking timeouts and vice versa
 
Well, I've ran into a problem. I want to create a GUI using ShowImg Controls, and I also want to give the players the option to move that. So I'm using canmove.
When I went on and added a timeout to update the GUI content, canmove magically stopped working. The next time I updated the weapon without doing anything, it was the other way round. I dont know exactly why it does it, and the script is ok, too. Well, and I need a fix for this. Currently, I'm calling the function to update the content from another weapon npc, but I want to avoid that. Any ideas?

DustyPorViva 12-29-2007 11:03 PM

I was messing around with canmove and showimg controls and I couldn't get it to work at all.

Crow 12-29-2007 11:14 PM

PHP Code:

new GuiShowImgCtrl("ShowImg_Test") {
  
10;
  
10;
  
width 32;
  
height 32;
  
image "block.png";
  
canmove true;


Works for me.

DustyPorViva 12-30-2007 12:25 AM

EDIT: nevermind... was a problem with GUI's inside other GUI's.

cbk1994 12-30-2007 02:52 AM

I'm guessing that in your timeout you're resetting the x and y of the GUI. Would help if you posted some code snippets.

Stopping the timeout would let you move it because in the timeout you're putting it right back every .05 seconds I'm guessing.

Just my guess, could be wrong.

Crow 12-30-2007 02:55 AM

I'm only setting the alpha in the timeout right now, nothing else. I might post some code snippets later.


All times are GMT +2. The time now is 11:54 AM.

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