Graal Forums  

Go Back   Graal Forums > Private forums > Graal4 Forums > Graal V4 Main Forum
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 10-17-2006, 10:40 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
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;
  }

  #2  
Old 10-18-2006, 11:45 PM
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
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
  #3  
Old 10-19-2006, 12:09 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
Thanks, that's what I was looking for.
 


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 08:05 AM.


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