View Single Post
  #1  
Old 01-07-2006, 04:17 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
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.
__________________
Skyld
Reply With Quote