Topic: Scripts!

Hi,
   Suppose, if I have two scenes with two defferent scripts. One for each level. Say, the second one is HUD overlay. Can I call functions or send/receive values between this two script files?
  Also, same like for script and dll. send receive values?

   Thanks
   Regards

Re: Scripts!

Hi, there is only one script running at a time, the only way to share lua functions
is to create a separate lua file and use "dofile("customFunctions.lua")" to link it.

But for sharing variables it's not possible without doing c++, I taught I did something but I probably forget,
lets add it to the script todo list.

If you create a dll plugin, there is 2 ways to share variables :

- create a custom behavior with some variables, you can then get/set these variables from script using :
getBehaviorVariable(object, behaviorId, « variableName »)
setBehaviorVariable(object, behaviorId, « variableName », value)

- create custom script functions using MScriptContext :
http://www.maratis3d.org/engine_docs/cl … ntext.html

Thanks

Re: Scripts!

From the main scene script, it is not possible to get the objects from overlay scene. Since only one script run at a time, it would be nice if the objects of overlay scene could also be able to get from the main script to change its property!

Regards