Page 1 of 1

Simkin ScriptModule

Posted: Wed Nov 04, 2009 17:00
by QuestOfDreams
Hello everyone!
I'm currently integrating CEGUI into the RealityFactory game shell (built around the Genesis3D engine). Everything's looking fine so far but now I want to expose some functionality (e.g. event handling) to our scripting system. We're using Simkin for scripting and it works quite a bit different from lua or python (e.g. execution of global stuff) and I can't find much information on CEGUI's ScriptModule either. Can anyone point me in the right direction?
Thanks in advance
Daniel

Re: Simkin ScriptModule

Posted: Wed Nov 04, 2009 17:44
by Jamarr
Hi, I don't think there is much information on creating custom ScriptModules. A quick search on the wiki only turned up this: Custom ScriptingModule. And there doesn't appear to be much info on the forums either. Your best bet is probably just looking over the existing lua module.

Re: Simkin ScriptModule

Posted: Sun Nov 08, 2009 11:36
by QuestOfDreams
Thanks for your answer. :) Maybe my problem is also too specific (or too simple :mrgreen:) ... what I'm currently struggling with is the concept of using global script functions in the ScriptModule because Simkin doesn't support these. Instead, each script (and its functions) is owned by a global 'variable'. So I'm not quite sure what's the best way to reconcile this with the given interface. :?
Maybe I'm just not seeing the wood for the trees. Anyway, I'll go on racking my brains. :hammer:

Daniel

Re: Simkin ScriptModule

Posted: Sun Nov 15, 2009 15:14
by QuestOfDreams
Just in case anyone is interested... My solution for now is to copy the contents of all script objects that get loaded via executeScriptFile into one global script object and use that one in calls to executeScriptGlobal/executeScriptedEventHandler. In the executeScriptFile function I also try to call the script method "main" if it is present in the script to compensate for the lack of global statements that would be executed in other scripting languages (e.g. lua).

I'm now in the process of writing a few wrapper classes to expose some CEGUI functionality to Simkin scripts. I'll keep you posted. :)

Daniel