Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Gani Frame? (https://forums.graalonline.com/forums/showthread.php?t=134265750)

scriptless 02-13-2012 09:45 AM

Gani Frame?
 
Is there anyway to show the current frame the ani is in? I know you can set them using

PHP Code:

setani("gani[123]"null); 

Where 123 is the frame. I just can't find anything on how to read the current frame number..

Any ideas?

Fulg0reSama 02-13-2012 03:04 PM

Might I ask what you would require the check for exactly?

Because I've been curious as to how this is possible too.

cbk1994 02-13-2012 03:19 PM

Quote:

Originally Posted by scripthelp
TGaniObject.anistep - integer (read only)

Haven't tried it, but looks like what you need.

Crow 02-13-2012 07:32 PM

Quote:

Originally Posted by cbk1994 (Post 1684456)
Haven't tried it, but looks like what you need.

It is. Using this:
PHP Code:

setAni(player.ani.name "[" player.ani.anistep "]"nil); 

Works.

scriptless 02-13-2012 07:47 PM

Quote:

Originally Posted by cbk1994 (Post 1684456)
Haven't tried it, but looks like what you need.

Thanks <3

Quote:

Originally Posted by Fulg0reSama (Post 1684453)
Might I ask what you would require the check for exactly?

Because I've been curious as to how this is possible too.

Fishing pole that is animated, I need to know what frame it is in so I can smoothly correct the starting point of the polygon (fishing line)..

:)

This seemed to work
PHP Code:

function onCreated() {
  
setani("fishing[2]"null);
  
player.chat player.anistep;


For some reason player.ani.anistep wasn't working.

cbk1994 02-14-2012 12:54 AM

Quote:

Originally Posted by scriptless (Post 1684483)
For some reason player.ani.anistep wasn't working.

player.ani is not a TGaniObject, it's a TGraalAni.

Crow 02-14-2012 01:01 AM

Quote:

Originally Posted by scriptless (Post 1684483)
For some reason player.ani.anistep wasn't working.

Quote:

Originally Posted by cbk1994 (Post 1684508)
player.ani is not a TGaniObject, it's a TGraalAni.

My bad.

ffcmike 02-16-2012 04:22 AM

It would be nice if there was a way to not only set a specific gani frame, but continue the rest of the animation that occurs after it.
Unless there is already?

oo_jazz_oo 02-16-2012 05:02 AM

Quote:

Originally Posted by ffcmike (Post 1684708)
It would be nice if there was a way to not only set a specific gani frame, but continue the rest of the animation that occurs after it.
Unless there is already?

player.anistep should just be allowed to be changed, instead of being read only...

Fulg0reSama 02-16-2012 05:14 AM

Quote:

Originally Posted by ffcmike (Post 1684708)
It would be nice if there was a way to not only set a specific gani frame, but continue the rest of the animation that occurs after it.
Unless there is already?

The only way I can think of atm is clever use of setbackto.
Hopefully my suggestion isn't a complete waste lol

Crow 02-16-2012 11:55 AM

Quote:

Originally Posted by ffcmike (Post 1684708)
It would be nice if there was a way to not only set a specific gani frame, but continue the rest of the animation that occurs after it.
Unless there is already?

Try:
PHP Code:

setAni("walk[4]"nil);
setAni("walk"nil); 

Maybe with a pause inbetween, no idea. But that should work. Something exists that does exactly what you want, and I'm almost 100% sure it was this code, but then again, it's been a while..

ffcmike 02-17-2012 10:16 PM

Quote:

Originally Posted by Crow (Post 1684728)
Try:
PHP Code:

setAni("walk[4]"nil);
setAni("walk"nil); 

Maybe with a pause inbetween, no idea. But that should work. Something exists that does exactly what you want, and I'm almost 100% sure it was this code, but then again, it's been a while..

Doesn't seem to work, it plays the full gani with or without a pause inbetween.

scriptless 02-18-2012 02:20 AM

Quote:

Originally Posted by ffcmike (Post 1684836)
Doesn't seem to work, it plays the full gani with or without a pause inbetween.

PHP Code:

setAni("walk[4]"nil); 

Should set the gani to frame 4.. however I don't know how to play from that point. If anyone finds how to make it play from that point please feel free to post a link here.


All times are GMT +2. The time now is 07:35 PM.

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