Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #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
  #2  
Old 01-08-2006, 02:46 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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.
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 03:01 PM.


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