[crossfire] Python bindings and forces

Andreas Kirschbaum kirschbaum at myrealbox.com
Wed Jun 1 12:51:35 CDT 2005


Alex Schultz wrote:
>
     
      Today I was tring to extend the "CreateInvisibleObjectInside" function
     
     >
     
      in the python bindings to also allow limited duration forces to be
     
     >
     
      created in the same manner that markers can do that. So I attempted to
     
     >
     
      add another optional parameter to allow the duration to set (in the
     
     >
     
      same measurement as the food parameter of marker objects). However
     
     >
     
      when I try to call it with:
     
     >
     
     
     >
     
         force = CFPython.CreateInvisibleObjectInside(activator, forcename, 1.00)
     
     >
     
     
     >
     
      the script crashes with:
     
     >
     
     
     >
     
         TypeError: function takes exactly 2 arguments (3 given)
     
     >
     
     
     >
     
      I've attached the modifications that I've tried to make to it here.
     
     >
     
      Anybody have any ideas?
     
     
It works as intended for me: I can call the modified function with
either two or three arguments. The two argument one creates a permanent,
the three argument one a temporary force.

Maybe Mark was right and your "make install" did not work? Or maybe you
did not restart your server?

    
    


More information about the crossfire mailing list