Hi all,
I´m really new to squirrel and sqplus. What I need is someone confirming that what I want to do is a good way to it. This is it:
1) My game has a spell system that have different effects on the player.
2) I will have to expose player class to squirrel
3) I want to have a directory with different spells (a file per spell) that will be loaded and registered at run time.
4) To do the register easily I will have something like this in every file:
SpellTable['this spell name] <- function (Player,...)
This way I will have all spells in a global table.
A spell as you can see will be just a function with input the player and
no ouput. The function just does things like Player->Heal(num of points) etc... play sounds, etc...
5) I will have a funcion , called "cast" that will be called from C++ (it lives in squirrel side). Something like Cast("name of spell", Player). That will get the correct spell function from the global spell array and call it.
What do you think about it? Is there any other better/easy way to accomplish what I seek (less binding code, etc...?)
Thanks in advance,
HexDump.