Skip to main content
GameDev.net gamedev.net
🔒 Locked

Automatically suspend after calling registered function

Started by SiCrane Dec 7, 2008 at 5:55 PM 1 replies 1.3k views
Original Post
SiCrane
SiCrane
Is it possible in AngelScript to register a function such a way that the virtual machine will automatically suspend itself after the function is called?
WitchLord
WitchLord
Yes. Example:

// C++void Suspend(){  asIScriptContext *ctx = asGetActiveContext();  if( ctx )    ctx->Suspend();}


Regards,
Andreas

[Edited by - WitchLord on December 8, 2008 7:33:37 AM]
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - <a href="http://www.angelcode.com/tower" rel
SiCrane
SiCrane
That seems to work great. Thanks.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.