🎉 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!

Delayed calling of functions

Started by
1 comment, last by Solokiller 9 years, 6 months ago

I'm trying to create a Reflection API for our game for use both in C++, and in scripts.

What i want to be able to do is store parameters passed to a function, and at some unspecified time in the future, call a function that can receive those parameters, either the exact types or types that can be cast to from the original arguments.

It should also optionally be possible to call a function with a given name that supports the first N arguments passed, ignoring the rest.

So far i've created a class that takes input arguments and stores them. I know how to set the arguments for a function if the types are an exact match, but converting all the types is a major hassle.

I'm wondering if there is any way to invoke the Angelscript compiler to perform these conversion for me, if possible.

I know it's unlikely, but i just wanted to ask in case it was possible.

Knowing what to do to convert one value to another would be a big help.

Advertisement

I suggest you take a look at how the dictionary add-on stores values and how they are then later retrieved. It may not be exactly the way that you want it, but I think you'll be able to figure out how to solve what you're trying to do by using it as an example.

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, i see how i can do this now.

This topic is closed to new replies.

Advertisement