Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

120 Neutral

About Meyer

  • Rank
  1. Meyer

    Any sample for callbacks ?

    Sorry , it works now, I just had to cast it like in the example  @test.onCompleteHandler= OnCompleteHandler(myObject.myMethod);
  2. Meyer

    Any sample for callbacks ?

    Hi again,   I tried to set my onCompleteHandler pointing to a class method but it doesn't work  (error : invalid opration on method) in the script i tried : @test.onCompleteHandler= @myObject.myMethod; (where myObject is a class instance) any idea ?
  3. Meyer

    Any sample for callbacks ?

    Thx a lot ! You were right. Now even if everybody knows my dirty secret ( I'm a bad programmer who forget to initialize variables ;-) ) I'm happy because I got callbacks with a generic (ref handle) userdata argument. It works great !!!
  4. Meyer

    Any sample for callbacks ?

    Hi, Do you have any sample explaning callbacks and funcdefs? Because I tried and still have crashes :-(   I try to register a callback with  r = engine->RegisterFuncdef("void OnCompleteHandler()");   and then a property with    r = engine->RegisterObjectProperty("Test", "OnCompleteHandler @onComplete", asOFFSET(Test, onCompleteHandler));    In my Test class I have a property declared this way :    asIScriptFunction *onCompleteHandler;   In my script I have a function   void MyCompleteHandler() { Log("Done"); };   but when this line is executed   @myTest.onComplete = @MyCompleteHandler; //<- crash when i try to set my property with my function handle.   I always crash in asCScriptEngine::CallObjectMethod because it tries to execute a release method on a object that doesn't exists.   Any help appreciated.   Thanks in advance      
  5. Meyer

    Tween script values from C++

    Thx for the rapid answer.   I'm currently trying to work with a reference class containing the float that will be updated by my c++ code, and it seems to work.   Concerning your question , I'm french so I'm not sure about the exact meaning of "tween" ;-) but for me it's an interpolation. And I consider a "tweener" as an interpolation system with special effects. Here are some links :   http://libclaw.sourceforge.net/tweeners.html       http://itween.pixelplacement.com/index.php
  6. Meyer

    Tween script values from C++

    Hi,   I would like to tween script values (or script properties) via a C++ tween module. But I don't know how to do this. In c++ it's quite easy, I just keep an int* or a float* and update values through these pointers but with angelscript float and int are value types and if I understand the documentation, I can't get any pointer to value types (and then I cannot modify them from my c++ code) It seems I might use the flag asEP_ALLOW_UNSAFE_REFERENCES  but I prefer a safier solution if possible. Do you have any idea  how to do this? Thanks in advance.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!