Jump to content

beo6

Developers
  • Posts

    795
  • Joined

  • Last visited

Everything posted by beo6

  1. On Android when a LE3 Game gets into the background and you come back to it You only see a black screen and you can't close the game completely. You need to go to the app Info or task manager and force stop the app.
  2. I would like a small roadmap. I don't even care if some things change over time. At least we would have an overview and wouldn't be surprised like the last change with only allowing one script per entity.
  3. i am working on a game that works only with Lua and so far it works pretty well i think. It is only a small game with many entities that have their own behavior in the object script. As soon as i have a script that is truly plug and play and does not rely on other stuff i will try to release it. For a bigger game i would for sure think more for C++ and probably only small in game stuff as Lua. of course it would be nice to have auto completion and stuff like that in the script editor but that might be a feature for the future.
  4. it does exist in Leadwerks 3. look into the GoblinAI.lua script. it is just called GetDistanceToEntity. I wonder how many other undocumented functions there are.
  5. i think you meant DistanceToPoint. True that would work but is a lot more to write. like self.entity:GetPosition():DistanceToPoint(self.target:GetPosition()) not sure if chaining functions in lua works this way
  6. i have seen the GetDistanceToEntity function in the GoblinAI.lua file but havent found it in the Command Reference Documentation. Maybe i am blind but it is really useful and should be in there.
  7. Thanks. works good. i just needed to SetGravityMode(false) because gravitation pulled it down so it never reached the desired position correctly.
  8. Hello everyone. i set the position of an entity by PhysicsSetPosition because SetPosition sets the position for a short time and then the Physic engine does set the position back where it was. That is of course logical. So i use PhysicsSetPosition but i don't want it to keep the force the entity had before. Currently it just continues moving into the direction it moved before and i only have the function to add a Force with AddForce or AddTorque. So how to do this the best way? Thank you for every help.
  9. Hello, i tested a bit to calculate the Lighting and i noticed this odd behavior. Everything is correct in the Editor but as soon as i run the game i see this: For some reason the Ball with Dynamic lighting got a odd color and the static shadow on the Cylinder looks odd. There is one Directional Light and one small Point Light(not visible in the screenshot) in the Scene. As soon as i change to Medium Quality for Lighting Calculation everything looks normal in Editor and when i run the game.
  10. what you describe sounds just like what the flowgraph is for. You have a function in your script. For example function Script:ReduceHealth(amount)--in self.Health = self.Health - amount self.component:CallOutputs("OnHealthReduced") end function Script:OnHealthReduced()--out App.displayedHealth = self.Health if self.Health <= 0 then self.component:CallOutputs("OnDead") end end function Script:OnDead()--out end (untested code) i tried in my own Project to have a HUD script but for some reason i could not draw to the context so i did it in the App:Loop of the App.lua script but i think that is another issue
  11. i wanted to change level so i tried Joshs example: inside the App.lua i have if self.loadnewmap~=nil then self.world:Clear() --self.world = World:Create() Map:Load(self.loadnewmap) self.loadnewmap=nil end in the App:Loop() and i then set App.loadnewmap = self.mapFile in my nextlevel.lua script from here http://www.leadwerks...430-next-level/ instead of loading it directly in the script
  12. as soon as i call self.world:Clear() in Lua the game crashes with the following error: --------------------------- Microsoft Visual C++ Debug Library --------------------------- Debug Assertion Failed! Program: C:\Leadwerks\Projects\DarknessAwaits\DarknessAwaits.debug.exe File: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector Line: 238 Expression: vector iterators incompatible For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts. (Press Retry to debug the application) --------------------------- Abbrechen Wiederholen Ignorieren --------------------------- self.world = World:Create() does work without any issue.
  13. I was at first also not sure about the loss of the multiple scripts per entity. But now i still can not see a real advantage of it. for the rotating/moving and music playing example: You will most likely play the music globally so you can have a music playing script in the world to do that and in the future when we got logical entities for the flowgraph we can do it with these. So you stay with the rotate/move script which in my opinion should stay together to be really reusable. I have two ideas i am not sure if they are really useful or would solve the issues for everyone. 1. we could just include scripts into the entity scripts in code (dofile, loadfile maybe?) 2. naming the different scripts or giving them ids: currently you can use the following: entity.script.TakeDamage(10)" but maybe it could work when we can name the different scripts like this: entity.scripts.damageScript.TakeDamage(10) entity.scripts.animationScript.DoDamageAnimation()
  14. Hi Rick. I see it this way at the moment: The attached script is really only for the entity behavior. So if you have a moving/rotating platform add the rotation and movement functions to it. You don't need to use both when you need only one movement. Then I would see the pure logical flowgraph entities for the events: button press -> start the movement of the platform. I know you would need to have another entity for a button anyway, just couldn't think for a better example. With multiple scripts attached you need to find the correct script first as Josh shows in the post.
  15. tested it and can confirm this. Even if i do not change anything in the script it looses the connection as soon as i save the script file.
  16. yes. he already mentioned that Lua projects will work like that in the future so there is no point in repeating that. Leadwerks is still very new and i am really happy how the engine works at the moment. Just compile it once and be happy. You normally don't create a new Project every day. And when you do not change the C++ code you can just copy the compiled binary files to the other project and everything would just work. If you don't want to install Visual C++ 2010 me or anyone else could give the files to you. I think you will not find any other engine that is more simple to setup a project for. Just my opinion. Back to your problem: i don't know what "cvluanh debugger" is. maybe have a look in the log file to see if there is something going wrong.
  17. No problem here testing a completely new created Lua Project. as he does not have the map supported error i think it is not because of the required compile of the project. i have no problem with compiling it at all since the process is still very simple and it is very nice that you can do mix c++ with lua.
  18. Please tell us what error you get. I think you already know that you need to compile your Lua Project with Visual C++ when you got the error "Map file xx not supported" ?
  19. i noticed the loss only when i was working on the script. Not sure if it looses the connection already when the script is re-saved or only slightly changed.
  20. I think you could just compile the source in your project and then copy the binaries into the template folder with the correct name. That way every time you create a new project it should copy the recompiled files. Don't know if this interferes with future updates though.
  21. You just need to compile the Visual C++ Project again for Debug and Release.
  22. I like the idea about pure logic entities. That would solve the case I was thinking about.
  23. I like this too. But i think i have issues to understand the script change. Why is it now impossible to have multiple scripts attached? Maybe some sort of index for attached scripts could work? I think now scripts can sometimes have repeated code in it. For example the Volume Trigger script together with the Sound Node Script attached to one entity. Now i need to have 2 entities or put both scripts together into a single script. Or maybe the Scripting wasn't made for such small script parts in the first place.
  24. beo6

    buoyancy

    I know it is not physically correct, but you could do something like this. function Script:Start() self.currentBounciness = 0 self.bounciness = 500 end function Script:Collision(entity, position, normal, speed) if speed > 3 then if ( self.currentBounciness ) == 0 then self.currentBounciness = self.bounciness else self.entity:AddForce(0, self.currentBounciness, 0) self.currentBounciness = self.currentBounciness / 2 end end end
  25. Hello, sorry for the missing file. I was able to reproduce the error. I created a new Project with the default map. i created a prefab of the single box in the scene which worked without any problem. Then i created a Cylinder and dragged&dropped it on the box in the scene-tree so it got a child of the box. then i rightclicked on the Box and created a prefab again. Now it crashes with the error: --------------------------- Windows exception --------------------------- EXCEPTION_ACCESS_VIOLATION --------------------------- OK --------------------------- And here is the Test project: http://code-i.de/LE3/TestProj.zip (9.4 MB) //Edit: It also does not work with the cylinder alone. So i suppose it does not like a cylinder inside a prefab. Edit2: Crashes also on Cone, Sphere, Tube, Torus and Arch.
×
×
  • Create New...