Squirrel as alt scripting language
#14
I'm not sure if this is gonna work. I can't figure out how to do something as simple as passing the newly created cPlugin to cPluginManager::AddPlugin() as a pointer or whatever.

But what worries me most is that Squirrel has no idea of the underlaying inheritance of classes, I mean I might export cSpider to Squirrel, but how does Squirrel know it extends cMonster or even cEntity? You won't be able to call the most basic functions such as GetPosition() without casting to a cEntity (if that is even possible)

In case you're wondering, Lua DOES know about the inheritance of the classes by using tolua_cclass(...), looks like this:
Code:
tolua_cclass(tolua_S,"cPickup","cPickup","cEntity",tolua_collect_cPickup);

This tells Lua cPickup extends cEntity, and the same is done for cSpider -> cMonster and cMonster -> cEntity, this way Lua knows cSpider is a cEntity


EDIT:
Nvm, Squirrel does know this. However I'm still stuck XD
Reply
Thanks given by:


Messages In This Thread
Squirrel as alt scripting language - by Kwen - 11-05-2011, 02:21 AM
RE: Squirrel as alt scripting language - by rs2k - 11-05-2011, 02:26 AM
RE: Squirrel as alt scripting language - by Kwen - 11-05-2011, 09:49 AM
RE: Squirrel as alt scripting language - by rs2k - 11-05-2011, 09:49 AM
RE: Squirrel as alt scripting language - by rs2k - 11-05-2011, 09:59 AM
RE: Squirrel as alt scripting language - by Kwen - 11-05-2011, 04:01 PM
RE: Squirrel as alt scripting language - by FakeTruth - 11-06-2011, 09:42 AM
RE: Squirrel as alt scripting language - by rs2k - 11-07-2011, 10:59 AM



Users browsing this thread: 1 Guest(s)