Dynamic reloading script
Thanks a lot for the contribution. I agree that many will likely find it useful.
I'll work on the implementation and make a little more generic so it can be used by everyone, and then add it as an add-on for the library.
I'll work on the implementation and make a little more generic so it can be used by everyone, and then add it as an add-on for the library.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
Thanks a lot for the contribution. I agree that many will likely find it useful.
I'll work on the implementation and make a little more generic so it can be used by everyone, and then add it as an add-on for the library.
[font="arial, sans-serif"][size=2]
Hello. I would like to know how you plan to make contact with the objects?
According to the index variable or her name?[/font]
You mean when reloading the stored data? It has to be by the name, as the index may not be the same.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
You mean when reloading the stored data? It has to be by the name, as the index may not be the same.
Yes!
Exemple code to reload
int var; index 0
bool var3; index 1
then store.
new script.
int var; index 0;
float time; index 1...
bool var3;
i think you understand! If store variables by name, with out index, only name - can change signature to global table, and change signature classes
this is a warning against the use of indexes, just in case, but you probably already knew!
Hello, (Sorry for my english )
Good news!!!! It's first update. I find bug, and kill him
script reloader 1.2
ScriptReloader.h
http://www.everfall.com/paste/id.php?ck2u2rz09qiq
ScriptReloader.cpp
http://www.everfall.com/paste/id.php?jrk0n7u8rrsr
use:
Good news!!!! It's first update. I find bug, and kill him
script reloader 1.2
ScriptReloader.h
http://www.everfall.com/paste/id.php?ck2u2rz09qiq
ScriptReloader.cpp
http://www.everfall.com/paste/id.php?jrk0n7u8rrsr
use:
asIScriptEngine *engine;
asIScriptModule *mod...;
CScriptReloader reloader;
reloader.Store( mod );
// After reload, need remove script engine - Why is this happening, I do not understand. Probably not an angel script recreates the classes are already there. On this engine to rebuild.
engine->Release();
// create engine, module, load scripts...
initialize();
reloader.Restore( mod );
If you know the typeId you can use the engine's AddRefScriptObject method to increase the reference. It will use the registered ADDREF behaviour for the type to call the AddRef().
Thanks for providing the update to the script reloader.
I plan to start incorporating your CScriptReloader into the SDK over the next few days. I'll let you know what adjustments I make to it in the process.
Thanks for providing the update to the script reloader.
I plan to start incorporating your CScriptReloader into the SDK over the next few days. I'll let you know what adjustments I make to it in the process.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
[color=#1C2837][size=2]Thanks
[color="#1c2837"]
[color=#1C2837][size=2]So, i update reloader( 1.3 ver ). Add can register user types - need for serialize reference objects...
[color=#1C2837][size=2]
[color=#1C2837][size=2]ScriptReloader.h
[color=#1C2837][size=2]http://www.everfall.com/paste/id.php?92o5q49sueoi
[color=#1C2837][size=2]ScriptReloader.cpp
http://www.everfall.com/paste/id.php?ymyudighiqeu
[color=#1C2837][size=2]
[color="#1c2837"]
[color="#1c2837"]
[color=#1C2837][size=2]So, i update reloader( 1.3 ver ). Add can register user types - need for serialize reference objects...
[color=#1C2837][size=2]
[color=#1C2837][size=2]ScriptReloader.h
[color=#1C2837][size=2]http://www.everfall.com/paste/id.php?92o5q49sueoi
[color=#1C2837][size=2]ScriptReloader.cpp
http://www.everfall.com/paste/id.php?ymyudighiqeu
[color=#1C2837][size=2]
[color="#1c2837"]
I didn't have success in finding the time to work on this yet.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement