Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-04-2011, 10:35 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
player.ani params

Is there any way to set params using player.ani?

I've tried

PHP Code:
player.ani "idle, block.png";
//(I've tried it without the space inbetween idle,block.png) 
but this just outputs

File download: idle, block.png.gani not found
__________________
Reply With Quote
  #2  
Old 10-04-2011, 10:41 PM
0PiX0 0PiX0 is offline
Coder
0PiX0's Avatar
Join Date: Jan 2011
Posts: 130
0PiX0 is a jewel in the rough0PiX0 is a jewel in the rough
setani(ganiname,parameter(s));
TServerPlayer.setani(str, str)
__________________
Reply With Quote
  #3  
Old 10-04-2011, 10:46 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Yeah- but I don't want to use setani :[

(I would need to re-script most of the movement- i'm wondering if there is a solution)
__________________
Reply With Quote
  #4  
Old 10-04-2011, 10:46 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by xAndrewx View Post
(I would need to re-script most of the movement- i'm wondering if there is a solution)
Use attributes instead.
__________________
Quote:
Reply With Quote
  #5  
Old 10-04-2011, 10:47 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 xAndrewx View Post
Yeah- but I don't want to use setani :[

(I would need to re-script most of the movement- i'm wondering if there is a solution)
It's the preferred method. Assigning a string to player.ani (which is an object) is not the way you should do it. Do some search and replace on your movement and get used to setAni().
__________________
Reply With Quote
  #6  
Old 10-04-2011, 10:50 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
boo his boo-

Not using attrs as they can be laggy on iOS device. /cry

I just wanted to use a param to save iOS file space (instead of creating so many different gani's when just replacing the image)

thanks though guys <3
__________________
Reply With Quote
  #7  
Old 10-04-2011, 10:53 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Tried directly modifying player.aniparams?
Reply With Quote
  #8  
Old 10-04-2011, 11:01 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by xAndrewx View Post
Not using attrs as they can be laggy on iOS device. /cry
I don't see why it would be anymore laggy than storing a string in a parameter.
__________________
Quote:
Reply With Quote
  #9  
Old 10-04-2011, 11:02 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
player.aniparams - wouldn't work.
By the looks of it, I couldn't modify it either.

Apparently ATTRs can cause lag, I'm sure Stefan said this :[
__________________
Reply With Quote
  #10  
Old 10-04-2011, 11:18 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
/cry only works on iDevices foo
__________________
Reply With Quote
  #11  
Old 10-05-2011, 12:09 AM
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
Quote:
Originally Posted by Crow View Post
It's the preferred method. Assigning a string to player.ani (which is an object) is not the way you should do it. Do some search and replace on your movement and get used to setAni().
Based on what I've heard, it's not anymore. Tig told me that Stefan (or one of his disciples) said to set it directly on iPhone servers (Ol West, Kingdoms iPhone) as it's faster or something. I agree that it's weird, since player.ani is supposed to be an object.
__________________
Reply With Quote
  #12  
Old 10-05-2011, 12:30 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
The problem is that player.ani is different on client-side and server-side.
On server-side it's just a string, and you can do player.ani = "aniname,params"; although you can also access player.aniparams separately.
On client-side it's an object, but you can assign a string to it to make it work similar as on server-side. This is the as with "profile = " assignments. On client-side it doesn't accept "aniname,params" though, but we can add that.
Using setani is a safe bet for now.
Reply With Quote
  #13  
Old 10-05-2011, 03:33 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 cbk1994 View Post
Based on what I've heard, it's not anymore. Tig told me that Stefan (or one of his disciples) said to set it directly on iPhone servers (Ol West, Kingdoms iPhone) as it's faster or something. I agree that it's weird, since player.ani is supposed to be an object.
That's strange as **** :/
__________________
Reply With Quote
  #14  
Old 10-05-2011, 06:39 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by cbk1994 View Post
Stefan (or one of his disciples) said to set it directly on iPhone servers (Ol West, Kingdoms iPhone) as it's faster or something.
I find this weird as I'd imagine the difference in time between one such built-in function and assigning a variable to be somewhat negligible.
So if this really does make a significant difference, wouldn't it also be better to assign such variables as this.isblocking, this.visible and this.layer instead of using this.dontblock();, this.hide(); and this.drawunderplayer();?
Reply With Quote
  #15  
Old 10-05-2011, 07:41 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by Stefan View Post
The problem is that player.ani is different on client-side and server-side.
On server-side it's just a string, and you can do player.ani = "aniname,params"; although you can also access player.aniparams separately.
On client-side it's an object, but you can assign a string to it to make it work similar as on server-side. This is the as with "profile = " assignments. On client-side it doesn't accept "aniname,params" though, but we can add that.
Using setani is a safe bet for now.

That would be great- thank you <3
__________________
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 04:06 AM.


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