🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

two simple questions

Started by
1 comment, last by coollofty 18 years, 8 months ago
1. When I must recomplie the script code? For a examples: I register two objects A and B, but the object B was not used in a compiled code. Then I removed object B or add a object C, or add some new methods to object A, does the code need recomplie? 2. I found a old post that about how to pass array object to host application function. It seems do that need I must register owner array object(i.e. register std::vector)? Thanks for reply :)
Advertisement
1.

If you're removing an object that is not used in the script, or adding another object then you don't have to recompile the scripts.

Likewise if you add new functions or methods you don't have to recompile the scripts.

If you intend to use dynamic configurations that changes during the lifetime of the scripts I suggest you use the configuration groups (perhaps you're already doing that). The scripts that use a configuration group will lock them so that you can't remove the group until the scripts are discarded first. The configuration groups that are not used will not be locked. With the configuration groups you can also specify which scripts should have access to which groups.

2.

In earlier versions of AngelScript you were forced to register your own array overload if you wanted to pass an array to the application. But this is no longer necessary, unless you need a specific array object.

If you register a function that takes an array (that is not overloaded) in the parameter, the parameter should be either a reference or an object handle. The function will then receive a pointer to the asIScriptArray interface that allow you to access the array elements.

Regards,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Oh, thanks for very perfect answer :)

This topic is closed to new replies.

Advertisement