
02-04-2007, 09:26 PM
|
|
Graal Administration
|
Join Date: Jan 2000
Location: Admins
Posts: 11,693
|
|
|
Simpliest solution would be to set some global variable to the player or player account, e.g. in the System-Weapon you do "localplayer = player;". The gani script can access all variables, so you just would need to check "if (player==localplayer)...". The "player" variable in gani script is the object to which the gani belongs, it can be the local player, other players, or even npcs or projectiles.
Another way (more complex) would be to set player.attr[1] to the gani script, and e.g. use player.attr[2] to the account name of the player, but that would be redundant and better be solved by the first way I have described. You can also pass parameters directly to the gani script without using another attr[], you would need to do something like "player.attr[1] = "myani.gani,1,2,3";" and in the gani script you get the parameters in onPlayerEnters(param1,param2,param2), I have not tested that a lot though (it works definitely if you use if (playerenters) and check for params[]) |
|
|
|