Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   GANI Manipulation problems (https://forums.graalonline.com/forums/showthread.php?t=63270)

Skyld 01-07-2006 04:17 PM

GANI Manipulation problems
 
PHP Code:

//#CLIENTSIDE
function onCreated()
{
  
gani findani("idle");
  
spritea = new TGraalAniSprite();
  
spriteb gani.getsprite(40);

  
player.chat gani.objecttype(); // returns TGraalAni
  
player.chat @= "|" SPC spritea.objecttype(); // returns TGraalVar
  
player.chat @= "|" SPC spriteb.objecttype(); // returns TGraalVar
  
player.chat @= "|" SPC gani.getsprite(40).objecttype(); // returns TGraalAniSprite
  
player.chat @= "|" SPC report_typegani.getsprite(40) ); // returns TGraalVar

  
with (gani.getsprite(40))
  {
      
player.chat @= "|" SPC this.objecttype(); // returns TGraalAniSprite
  
}

  
with (gani.steps[0])
  {
    
player.chat @= "|" SPC this.objecttype(); // returns TGraalAniStep
    
with (this.addpos(40))
    {
      
player.chat @= "|" SPC this.objecttype(); // returns TGraalAniPart
      
this.sprite 40;
      
player.chat @= "|" SPC this.sprite// returns ""
      
this.sprite gani.getsprite(40);
      
player.chat @= "|" SPC this.sprite// returns "" 
    
}
  }
}

function 
report_type(obj)
{
  return 
obj.objecttype();


In my attempt to create a Gani Shop for Linux use, I've encountered numerous problems with the manipulation system provided in the Graal Linux (Gentoo) 4.0302. The problem seems to lie in, provided the example, that the getsprite returns an object conditionally: That is to say, it's inconsistent when it does and doesn't. Likewise, setting a variable to the object (as a link, of course!) makes it refer not to the Variable Object, but the Sprite Index. It seems, however, that to add, alter, and do anything with the sprites, you need to be able to set the sprite as the object. I've tried creating a GANI Editor, however, problems later on occurred when I tried adding sprites to the current GANI --This problem is more globalized to AttachSprites as well.

Admins 01-08-2006 02:46 AM

Yes I have checked it and saw that TGraalAniSprite and similar are not marked as 'static object' which means you have read-access to it's variables but can't pass it as object or link to it. Will fix it with the next version.


All times are GMT +2. The time now is 02:46 PM.

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