Jump to content

Rekindled Phoenix

Members
  • Posts

    471
  • Joined

  • Last visited

Everything posted by Rekindled Phoenix

  1. It is not built on top of LE.Net, but a different OOP structure that follows the common practices of .Net developers. It includes events, inheritance, and other .Net features that Josh's API doesn't support with the vanilla libraries. I appreciate ZioRed for offering the library as an alternative solution. I will support Leadwerks.Net until 2013, or until LE3 adds a C# library. Even then I would still build an OOP library with an entity structure that's not based on the legacy TEntity objects . Hell, even LUA supports inheritance. As Raz pointed out, look at the pinned thread in the C# forums. How to use it can be found HERE
  2. Lazlo, klepto2, along with a few others were able to successfully pull this off. Unfortunately, since the server crash a lot of the resources were lost. Hopefully they'll see this post and respond. Here are some forum links that might get you started. Leadwerks rendering to custom controll TKControl Beta
  3. Currently I have not bee able to ascertain the reason behind this. I believe it relates to the console commands (possible Win32) that are intercepted by Visual Studio; commands are executed from an 'unsafe' non-CLR library. (I could be totally incorrect, just a guess) You have the option to traverse the file generated by the Leadwerks code, as it is appended and write that to the console manually. Although, I wouldn't recommend that.
  4. Thanks everyone for the suggestions! I will have to experiment to see what gives the best results Anyone know how Josh accomplishes this within the editor?
  5. Are there examples within the community that draw a circle using the cameras perspective? Like the sandbox paintbrush, I need to display a radius around an object using DrawLine() or something similar. I've looked at how this wiki link does it, possibly transpose the vectors. How would you draw a circle aligned to the terrain?
  6. If you are to do research on how large scale shooter MMOs have succeeded, I would look at All Points Bulletin. Their open world provides several degrees of multiplayer freedom and chaos, while also allowing users to opt-in to quests at any time.
  7. Looks like the issue is resolved. Instead of trying to access the within each object, I create a 'marshaller' that does the drawing for the necessary objects. function UpdateCablesCycleThru() --model,object for k1,v1 in pairs(objecttable) do if v1.type ~= nil then if v1.type == NavTypeName then local Pos2 = CameraUnproject(fw.main.camera, k1.position) DrawPath(Pos2) end end end end function DrawPath(Pos2) --Used for each object for k,v in pairs(objecttable) do if v.type ~= nil then if v.type == NavTypeName then --inherited from 'PhoenixPath' -- Draw elements using both positions local Pos = CameraUnproject(fw.main.camera, k.position) DrawLine(Pos2.x, Pos2.y, Pos.x, Pos.y) end end end end
  8. My goal is to cycle all of the entities, and exclude the object that is invoking the event. The problem is that the function attached to AddHook() doesn't have a reference to the object that attached the hook. Seems the AddHook() function can only be passed a delegate (.Net reference) without parameters. (Since the objects I will be adding are not sorted in order, indexes aren't an option) function class:CreateObject(model) local object=self.super:CreateObject(model) AddHook("Flip", UpdateCycleThru(object)) --fails function object:Free(model) RemoveHook("Flip", UpdateCycleThru(object)) --fails self.super:Free() end end function UpdateCycleThru(object) -- Cycle through nodes applying a draw method, except for self end So my question is, how does an object identify itself from the rest of the objects within the scene, when the function is called outside of the Class overrides? Looking further into this issue, I may have to cycle through these objects using an external script marshaller...
  9. If you use Blender (which can export to almost any format besides GMF), you have the ability to convert your models through any of the included converters. Blender -> FBX -> GMF Blender -> OBJ -> GMF etc....
  10. That video with the bunny model seems to be the way Crysis does their snow / water effects, almost like a projection light that applies onto vertices with a certain angle.
  11. With each new object script, is the key for 'collision' being set to 'COLLISION_PROP' ? New instances run the constructor script. Not at home to test, but this might help you function class:CreateObject(model) local object=self.super:CreateObject(model) object.model:SetKey("collision","COLLISION_PROP") end
  12. As long as you aren't using their dedicated servers, I thought it would be as simple as putting placeholders where the Steam API for Achievements would go. Pseudo code that fires an event, causing the player to get an Achievement if (PunchedALynxInFace > 60) { //Call Steam API (I honestly don't know how it works) //Steam.AddAchivement(Steam.CurrentUserID, this.GameID, enumsAchievements.AnimalAbuser) }
  13. Is it even possible to add properties to the parent object when it's added as a 'require' field? I'm thinking of it backwards. The scripting system is designed to be a 'per object instantiation' where access to a class requires parameters or a constructor. Lua is not structured where inherited objects have a reference to the parent that instantiated them. Would this be the best way for added scripts to modify their assigned object? --represents any object class require("PhoenixPath") local class=CreateClass(...) function class:InitDialog(propertygrid) self.super:InitDialog(propertygrid) -- AddPathingProperties(propertygrid) end function class:CreateObject(model) local object=self.super:CreateObject(model) -- SetKeys(object) end -- PhoenixPath library function AddPathingProperties(propertygrid) group=propertygrid:AddGroup("Pathing") group:AddProperty( "Avoidance Radius", PROPERTY_FLOAT,'|1,50,1') group:Expand(1) end function SetKeys(object) object.model:SetKey("AvoidanceRadius","2") end
  14. I want others to be able to define avoidance and guidance radii that are attached to any object the user chooses. In order for them to inherit these, special property keys must be assigned. How do I handle includes or property group modifications that the parent is already making? Does the included / required script get executed before the main script is run? How would I add properties to the parent object?
  15. This works perfectly! thank you
  16. Thank you for the help. Hopefully I'll have something asset-worthy soon for pathfinding
  17. Is the camera that is rendering the scene parented in anyway to another object? Parenting has caused several water related issues for me in the past. I've solved this by updating the object that I wish to mimic rotation and positioning, then set Camera.Matrix = Object.Matrix with each render loop.
  18. What we need is a texture brush! I threw a quick render of the types of brushes you can use in Blender using 'Distorted Noise'. (Drag / Tile / 3D ascending order) What do you guys think?
  19. I just ran across this issue handling objects within the editor... and then I *facepalm*
  20. I'm coming across an odd issue related to drawing labels on objects using the recently posted script. As shown in the screenshot, if I am facing the opposite direction, by moving the camera forward a couple of units, and the unproject function is printing the label as if the rock was on the other side of the map. Do you know what's going on??
  21. This sounds very promising. I'm extremely excited about the additional "smart shader" for the upcoming engine
  22. I'm currently working on a pathfinding module that I can attach to any NPC within C#. Once that is completed, I'm going to try to port as much as possible to Lua for others to use. Users will be able to choose different types of pathfinding defined in the dropdown that will be available within the Editor property menu. I'm taking the method applied in this blog post, and adapting it to the standard Leadwerks AI_Node objects for others to use. Using a combination of avoidance objects to define the blacklist where not to walk, and (completely optional) NavMesh nodes to use for guidance, will create a flexible and easy to use pathing system.
  23. This is exactly what I was looking for! I will probably modify your script to scan through all entities, checking for "NavMesh " types. This will give me a collection of entities to attach the DrawLine() method too. Checking 'fw' will allow me to only execute the script within the Sandbox for demonstration. Thank you Rick!
  24. Thanks Rick for the awesome code sample. I guess my question was more related to individual item scripts interacting on their own. Can you help? I still can't get it to work... require("scripts/class") local class=CreateClass(...) function class:InitDialog(propertygrid) self.super:InitDialog(propertygrid) local group=propertygrid:AddGroup("Pathing") group:AddProperty("Avoidance Radius",PROPERTY_STRING) end function class:CreateObject(model) local object=self.super:CreateObject(model) function object:Update() -- self.model:Turn(Vec3(0,1,0)) -- Used to verify script is valid local cpos = EntityPosition(self.model) local Pos = CameraUnproject(fw.main.camera, cpos) DrawText("I'm located here!", Pos.x, Pos.x) end end I know I'm somewhat close to the solution, but I keep getting exceptions which crash the Sandbox. I'm still getting used to the Lua syntax...
×
×
  • Create New...