Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #16  
Old 02-09-2007, 11:44 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by Chompy View Post
Hmm, can you explain what it does?
Still not getting the player.attr[] stuff :[

Got any easier examples?
Sure
HTML Code:
//#CLIENTSIDE
function onCreated()
{
  player.attr[3] = "bombermad_bomb.gani";
}
Would make the bombermad gani display over your graal character. Well, if you were to have that gani that is.

HTML Code:
//#CLIENTSIDE
function onPlayerChats()
{
  if (player.chat == ":setAttr")
  {
    temp.curAttr = player.chat.substring(8, 1);
    temp.curGani = player.chat.substring(9).trim();
    player.( @ "attr[" @ temp.curAttr @ "]") = (temp.curGani.ends(".gani")? temp.curGani: temp.curGani @ ".gani");
  }
}
:setAttr 3 myGani.gani
choose a gani from inside of your graal folder, which is a solid object for example.

Edit: I'll write a few documents explaining the advantages to using player attributes.

Last edited by Chandler; 02-09-2007 at 11:56 PM..
Reply With Quote
 


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 12:43 PM.


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