#define preprocessor directives from within Angelscript

Started by
3 comments, last by luveti 9 years, 7 months ago

Is there a way to do this? I would like to be able to do this http://www.angelcode.com/angelscript/sdk/docs/manual/doc_addon_build.html#doc_addon_build_condition but define SERVER or CLIENT from within my script. Thank you! smile.png

Advertisement

The CScriptBuilder does not currently have support for defining new words from the script. However, you can easily customize the CScriptBuilder on your own to add this support.

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

I'll look into implementing this into the game engine I'm using! Thank you!

You may want to take a look at preprocessor written years ago by Anthony Casteel. Can't see the anything linking to it on the page itself, but fast googling shows that it's still around. Other than #define and friends, you'll also get #include and skeleton for #pragma what should be enough even for bigger scripts.

Games are meant to be created, not played...

That Anthony guy has a lot of cool stuff on his site! Thanks for sharing that :). But this would be a really nice addition to the scripting engine itself!

This topic is closed to new replies.

Advertisement