Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Gani Construction (https://forums.graalonline.com/forums/forumdisplay.php?f=50)
-   -   Doing math on Param3 to determine the sprite# (https://forums.graalonline.com/forums/showthread.php?t=84218)

Tyhm 02-15-2009 03:16 PM

Doing math on Param3 to determine the sprite#
 
I think I'm back in "Guess the operator" territory; or maybe this is beyond Gani capabilities, I dunno.

The idea is, I want to send Param3=0(or any number up to about 20)
then I want the gani to say this object here is sprite#403+PARAM3

Can it be done? Obviously it's not gonna be 403+PARAM3, or (403+PARAM3), or 403+strtofloat(PARAM3); and since PARAM3 gets added to a whole mess of things, I can't just send in PARAM3=404, PARAM4=405...I'd be at it all day!

It's probably all for naught anyway; all I'm really trying to do is make a gani that can wear dynamically different colors than the NPC/Player that called it...I thought about using a ganimovie, but those attributes seem to be set in stone...

Novo 02-15-2009 06:23 PM

I get ye... I had this situation way back in the time. I don't think you can display a calculated sprite.

We had facial emoticons that we wanted to use on the ganis. What we ended up doing was using 4 PARAMS each with the SPRITE # of the emoticon we were interested in and putting PARAM# in the ani step.

Although, if things have changed since, I'd be interested in learning about it.

xXziroXx 02-15-2009 06:27 PM

I'd suggest forum PMing a link to this thread to Stefan.

Tyhm 02-16-2009 12:27 AM

I'll give it a couple days first; I'm going to feel rather foolish if I bother Stefan and it turns out it's just another one of those "Simple Operators" like @. (that you have to know what it is to look it up on the wiki...)

Dan 02-16-2009 12:43 AM

I believe you can do something like; setani("gani[sprite]",""); to display a certain sprite only. But I don't really understand what you want so this may not be helping...

Tyhm 02-16-2009 12:58 AM

"sprite" is a bit misleading: I'm referring to the internal-GANI term "sprite" which means "A portion of an image, given an index number. Many of these make up a Frame of animation, which is referred to externally as a Sprite in the sense of setani "gani[sprite]","").

What I'm looking for is a way to, for instance, put a number in Param3 and, instead of displaying sprite 100, it displays 100+Param3 - and instead of 101, 101+Param3, etc. Right now it can display 100, or it can display Param3, but it can't display any kind of formula.

Ultimately all I want to do is have one NPC display 2 different dynamically-determined characters - say, one wearing all black and one wearing all white, or one wearing all green and one wearing all blue, whatever I tell it to. Unfortunately Showani always gives the displayed gani the properties of whatever NPC called it; Fung Si Yan's showanis always look like Fung Si Yan. I've even tried having Fung Si Yan showani a ganiscript with parameters, then it changes its character properties and showanis based on the new properties...but ganiscripts aren't allowed to use setcharprop or sleeve=red or setsleeve(red), etc. (Well, I know they can't use setcharprop anyway, I may not have tested GScript2 and 3 commands in ganiscripts).


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

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