Array help, please
Posted: Mon Feb 28, 2005 1:00 pm
I'm currently in the process of designing my first online-game (Good vs. Evil).
I'm currently writing the code for the function which will calculate the life/magic/stat changes when an attack is made, spell cast, etc. Well, I'm wanting it to return all the stats in an array.
Is there any way to do this?
If you don't understand, this is how I'm hoping to code it.
I realize that syntax probably isn't correct; but, that's the format I want to use. Can anyone offer a solution or help for this? Thanks.
Name-Less,
Administrator of GvE
I'm currently writing the code for the function which will calculate the life/magic/stat changes when an attack is made, spell cast, etc. Well, I'm wanting it to return all the stats in an array.
Is there any way to do this?
If you don't understand, this is how I'm hoping to code it.
Code: Select all
function battle_system_function(arg1, arg2, etc . . . ) {
//
// All calculations take place here
//
return array_here;
}
arrayї] = battle_system_function;Name-Less,
Administrator of GvE