View Single Post
  #1  
Old 05-24-2005, 02:20 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
New scripting engine fixes

Today a new npcserver has been uploaded which fixes several things. Restart it to update it to the latest version:

- player.triggerclient(weaponscript [,params]) has been added, works like triggeraction(0,0,"clientside",params)
- object.trigger("action",params) is also accepting single parameters (was only accepting parameters before if there were at least 2 of them)
- when a script is run for a player (e.g. if you player.join("myclass")) then the current player is correctly set and functions like setlevel2 should work correctly
- npc.save[] can correctly be accessed on clientside
- if a variable is not an array (size()==0) then you can access the content of the variable also with "var[0]", which is the same like using "var" then; this is for compatibility with old Graal script.
- in compound statements like "if (var) { this.test = 1; drawunderplayer}" it is now accepting old style graal commands (e.g. drawunderplayer) without semicolon if it's used directly before the closing bracket }. This is for compatibility with old Graal script.
- arrays like npcs[] and players[] can now be assigned to normal variables (still using a link to the originial array so no speed problems), like
e = level.npcs;
echo("npc count: " @ e.size());
- assigning a sub array to the array variable is not crashing the npcserver anymore, so you can do stuff like this now:
this.arr = {{1,2},3,4};
this.arr = this.arr[0];
Reply With Quote