Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Bug Report
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 02-04-2013, 05:31 AM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
setani params not compatible with GS2

Edit: *showani

As mentioned in this thread:
http://forums.graalonline.com/forums...ad.php?t=58557

I was having this issue recently. Pulling my hair out because I could not for the life of me get my ani (shown with showani, if it matters) to acknowledge params sent to it until I changed "function onCreated()" to "if(created)"

That's an 8 year-old thread
__________________
MY POSTS ARE PRONE TO EDITS!

Last edited by Jiroxys7; 02-04-2013 at 06:10 AM..
Reply With Quote
  #2  
Old 02-04-2013, 05:58 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Your post lacks some important info... like the script in question.
Reply With Quote
  #3  
Old 02-04-2013, 06:07 AM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Quote:
Originally Posted by DustyPorViva View Post
Your post lacks some important info... like the script in question.
It's pretty much exactly what it says on the tin.

If you do showani(200,player.x,player.y,player.dir,"myani"," superkewlparam");

...Then in the gani doing: player.chat = param[0]; or whatever inside a "function onCreated()", it will always return null unless you do it in an "if (created) statement instead.
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote
  #4  
Old 02-04-2013, 11:57 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Try:
PHP Code:
showani(200,player.x,player.y,player.dir,"myani,superkewlparam"); 
showani() only accepts five arguments, of which only the last one is a string.
__________________
Reply With Quote
  #5  
Old 02-04-2013, 06:03 PM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Quote:
Originally Posted by Crow View Post
Try:
PHP Code:
showani(200,player.x,player.y,player.dir,"myani,superkewlparam"); 
showani() only accepts five arguments, of which only the last one is a string.
Not true. Otherwise it wouldn't have worked even with "if(created)".
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote
  #6  
Old 02-04-2013, 06:15 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Jiroxys7 View Post
Not true. Otherwise it wouldn't have worked even with "if(created)".
Quote:
Script help for 'showani':
TServerNPC.showani(int, float, float, int, str) - returns object
Give what I said a shot. Does it work?
__________________
Reply With Quote
  #7  
Old 02-04-2013, 09:49 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
It's a special "hack" to access gani parameters inside gani scripts: if you use if (playerenters) and such then you can access the gani parameters via params[]
Reply With Quote
  #8  
Old 02-05-2013, 12:38 AM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Quote:
Originally Posted by Crow View Post
Give what I said a shot. Does it work?
Didn't work for me :s
Edit: I feel like ganis are being very fickle. I've been trying to debug them using player.chat = whatever, and half the time it simply doesn't work. No apparent rhyme or reason considering that It'll do this even if the updated gani is identical to a version I had a few moments ago where it worked. At the time of posting, your suggestion didn't work. There were no syntax errors, and it definitely wasn't my imagination. It simply did not work. And now for no apparent reason your method of passing params is suddenly working.

Quote:
Originally Posted by Stefan View Post
It's a special "hack" to access gani parameters inside gani scripts: if you use if (playerenters) and such then you can access the gani parameters via params[]
While we're on the topic, would there be any way to do something like this?

PHP Code:
SCRIPT
if (created){
  
onTimeout();
}
function 
onTimeout()

  
thiso.tu player.findweapon("WeaponName").GetCharge(); //<-- This
  
setTimer(.1);
}
SCRIPTEND 
Using just "findweapon("$Titan Blade").GetCharge();" works fine on your end if you're the one that's using it. It gets a value that changes the gani's colors over time as you hold a key down. Except for everyone else, it looks for WeaponName on THEIR account, which usually won't exist. Plus it's not likely that they're just going to happen to be holding the same key that's needed. Causing it not to change color on their end.

Stuff like player.x, player.y, and player.account will all accurately recognize the player that invoked the gani. But would it be possible for us to do more with that player? Or will I have to resort to a more hackish approach and send this value as it's own param and rapidly re-apply the animation over and over in order to achieve this?
__________________
MY POSTS ARE PRONE TO EDITS!

Last edited by Jiroxys7; 02-05-2013 at 01:12 AM..
Reply With Quote
  #9  
Old 02-05-2013, 12:44 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Your best bet for fetching data inside a gani:
  • If you only need data of the player viewing the gani, use client.vars.
  • If you need data of the player the gani is attached to (or which the player is "using", for that matter) use player.attr[].
__________________
Reply With Quote
  #10  
Old 02-05-2013, 01:27 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Also, typically use playerenters and not created.
__________________
Reply With Quote
  #11  
Old 02-11-2013, 11:16 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
Also one comment about shown: if you provide more parameters than necessary then it's adding them comma-separated to the last parameter, so it can be used to provide gani parameters.
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 08:12 AM.


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