Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Graal V4 Main Forum (https://forums.graalonline.com/forums/forumdisplay.php?f=143)
-   -   getanisprites() gani function? (https://forums.graalonline.com/forums/showthread.php?t=69482)

Yen 10-17-2006 10:40 PM

getanisprites() gani function?
 
Is there any chance of something like 'getanisprites(frame)' to return an array with references to the sprites of the specified frame of a gani?

Like, if I use idle.gani and use getanisprites(0), it will get the sprites used in the first frame. Then, I could use the array that was returned to read something like sprite.x, sprite.y, sprite.image, sprite.width, ect.

PHP Code:

this.list_ani_sprites findani("sword").getanisprites(3);
for (
athis.list_ani_sprites) {
  if (
a.image == player.swordimg) {
    
findimg(1).image "crystalflash.png";
    
findimg(1).a.x;
    
findimg(1).a.y;
  }



Admins 10-18-2006 11:45 PM

Hmmm the gani objects are documented on the wiki, but some array variables are not listed there yet I think:

ani.sprites[] array of TGraalAniSprite
ani.steps[] array of TGraalAniStep

anistep.sounds[] array of TGraalAniSound
anistep.spritepos[] array of size 1-4 depending if it's singledirection or not, each member is itself an array of TGraalAniPart

Yen 10-19-2006 12:09 AM

:D Thanks, that's what I was looking for.


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

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