If you don't want the script to be able to instanciate the type, then you should register the type as a reference type without any factory function. All value types must be instanciable by AngelScript.
If you also do not want the script to be able to hold any extra references to the type then you can register the type with the asOBJ_NOHANDLE flag, in which case the ADDREF and RELEASE behaviours shouldn't be registered.
If you want to allow the script to store reference to the type, but don't care about reference counting, then you can register dummy functions for ADDREF and RELEASE that doesn't do anything. In this case the application will be responsible for making sure the instance outlives all references that the script may store (for example global variables).
---
Non-default constructors are implemented as such:
void constructor(int arg, void *memory){ new(memory) Object(arg);}r = engine->RegisterObjectBehaviour("val", asBEHAVE_CONSTRUCT, "void f(int)", asFUNCTIONPR(Constructor, (int, void*), void), asCALL_CDECL_OBJLAST); assert( r >= 0 );
You can also use asCALL_CDECL_OBJFIRST, in which case the memory pointer should be placed as the first argument.
---
The @ symbol (means 'object handle') is only available for reference types.
In fact the script you compiled should have given a compilation error when you declared the parameter as a handle to Creep, since you registered the Creep type as a value type. I'll have to look into why this didn't happen.
EDIT: This was indeed a bug. I've already found and fixed it. The fix should be available in the SVN this weekend.
[Edited by - WitchLord on January 16, 2009 7:25:12 AM]