Jump to content

macklebee

Members
  • Posts

    3,946
  • Joined

  • Last visited

Everything posted by macklebee

  1. do you have this entire code in your bmax program? Function SetScriptObject(name:String, o:Object) Local size:Int=GetStackSize() lua_pushbmaxobject(luastate.L,o) lua_setglobal(luastate.L,name) SetStackSize(size) EndFunction Function GetStackSize:Int() Return lua_gettop(luastate.L) EndFunction Function SetStackSize(size:Int) Local currentsize:Int=GetStackSize() If size<currentsize lua_pop(luastate.L,currentsize-size) EndIf EndFunction are you setting the ScriptObject? Global fw:TFramework = TFramework.Create() If Not fw RuntimeError "Failed to initialize engine." SetScriptObject("fw", fw)
  2. its the recursive parameter to EntityColor
  3. hmmm this seems to work fine for me... require("scripts/class") local class=CreateClass(...) function class:GetLight() class = classnametable[ "light_directional" ] if class~=nil then for model,object in pairs(class.instances) do return model end end end function class:CreateObject(model) local object=self.super:CreateObject(model) local light=class:GetLight() light:SetColor(Vec4(0,1,0,1), 1) end when I place the entity that has this script into the scene it instantly changes the directional light's color...
  4. looks like you are trying to set the color for the light class and not the light model. Need to see your complete code to be able to tell for sure whats going on...
  5. 2.31... perhaps it has something to do with the new shadow casting options... i notice that you do not have the "castshadows" key in your sbx file... EDIT- agree with MG. you appear to be using an old shaders.pak... i replaced your pak with my current one and i cannot get that shadow error
  6. i get the same thing with your example... but was unable to get it to occur in my own example scene... or on any thing I have used around point lights...
  7. 1) linking it to the object you are trying to access it with and using the GetTarget() or 2) setup a global entity inside the directional light script and refer to it in your script or 3) use the method described on page 12 of the Getting Started with LUA pdf file. I would use method 3
  8. A controller has to have something to stand on or it will fall. And even if you are creating the controller ontop of the test2_estafet.gmf, you need to make sure the collision relationship is set between the two. You have not set the collisiontype/entitytype of the test2_estafet.gmf.
  9. ok... there's only a sbx file in that... the test2_estafet.gmf isn't available. Also there is not a terrain in the sbx file, so that means unless the test2_estafet.gmf is large enough for a controller to stand on top of it (and you are creating the controller ontop of it), the controller will continue to fall.
  10. same problem with this line: local terrain = class.GetTerrain(world)
  11. The main reason why you have such a high drop in the fps is due to the Render function. Change it to another function like object:UnlockKeys().
  12. require("scripts/class") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) object.model:SetKey("classname","OBSTACLE") end I wouldn't rename the class, but perhaps give it a classname... and while INI files are still useable at the moment, based on what Josh has said recently I wouldn't count on INI files working in future versions. In any case, why are you parsing your sbx for your models? other than some issues with emitters and lights having pickable meshes (which can easily be taken care of with intelligent placement in the scene), the LoadScene command and the object's lua script basically takes care of the model's settings and properties.
  13. The emitter lua script uses: SetWorld(transparency) CreateEmitter (...) SetWorld(main)
  14. macklebee

    test

    hmmm... cant delete a topic?
  15. try increasing the altitude in the editor's terrain mode.
  16. looks like you are loading a gmf and not a sbx file for your scene... you need to create a sbx file in the editor and load that using LoadScene() not LoadModel()... your player doesn't have anything to spawn on perhaps? unless maybe your scene.gmf is an actual scene?
  17. post your code so someone can see whats happening. without the code they can only guess.
  18. +1 its time to start supporting actual useful requests
  19. +1 its time to start supporting actual useful requests
  20. hmmm... well Marleys tests appear to show about the same fps drop, but for some reason i still have a large drop... so there is probably something still that needs to be fixed in my current version... ive changed so much while pulling my hair out trying to figure out what the heck happened... well, i am experimenting with just using renderworld() at the moment and its not too bad... just need to get the other framework cameras set to the cctv camera... just unfortunately do not get the nice framework effects on the screen as well...
  21. so now if anyone wants to create their own buffers in lua it has to match the framework buffer dimensions? seems like a big waste of resources just so someone can take a screenshot for a 3d game...
  22. yeah... that appears to be it. but since we cant swap to a smaller buffer now to be painted onto our screen, the fps drops 100+fps instead of ~10fps...
  23. no... ssao/ssdo is not selected.
  24. Was there something else that was changed in this update? something in the lua framework? The CCTV object that MG and I created drops the fps down to single digits now when its activated in the editor or in a standalone lua program. But when loaded from a sbx into a bmax program it works fine. It appears to be an issue with lua's fw.Render()...
×
×
  • Create New...