Jump to content

Xmlspy

Members
  • Posts

    24
  • Joined

  • Last visited

Everything posted by Xmlspy

  1. If possible use Ultimate Unwrap 3D, it's what worked when going from FPSC .x to .fbx.
  2. Here's a tutorial that may be useful for those trying to create an RTS-like camera. The tutorial covers: Camera positioning. Camera movement (panning, zooming, turning). Selection of single character or group of characters via left click and also via a Selection Box. Assigning an action to a single character or a group of characters. Sample code is given. Link: http://www.jessebandersen.com/2014/08/rts-camera-in-leadwerks-engine.html
  3. I'm still getting used to LUA, but I find this to be a bit weird because I really want to write Math:Sqrt because many functions are written in that way. I guess it will be math.sqrt for now. Thanks.
  4. Does anyone know if Leadwerks has a square root function for LUA? EDIT: sqrt is highlighted in blue, but it doesn't work. The reason I want a square root function is to determine the distance between two points using xy positions and the good ol distance formula sqrt( (x2-x1)^2 + (y2-y1)^2 ). Since there is no square root function (that I have found) one workaround is to create two pivot points, give them the x and y positions of each point, then use pivotOne:GetDistance(pivotTwo).
  5. This tool might be useful for those creating lots of tables/arrays in LUA. I'm using it for actor animations, actions, subactions, and to keep track of "types" of entities (such as walls, floors, actors, etc). More info: http://www.jessebandersen.com/2014/08/lua-table-maker.html
  6. Hurray! http://www.leadwerks.com/werkspace/blog/1/entry-1256-animation-pipeline-improvements/
  7. I think you are likely right on the Brightness sliders. Regarding the intensity of the prefab here's an image demonstrating the problem. On the right we have the model that has the Diffuse brightness adjusted. This right model is then saved as a prefab and then loaded with Prefab:Load(), which is seen on the left side. It seems that the brightness adjustment is not retained. Doing :SetIntensity(2.5) on the prefab corrects the way it looks, but I would rather not have to do that.
  8. Is the Intensity/brightness supposed to be retained in prefabs? As of right now it doesn't seem to save those values. Also, there's two Brightness sliders in the Appearance tab, see attached image.
  9. One more method--assign scripts with identifiable function. How to: Create a script that holds a "Script:IsWall()" function, and assign the script accordingly to each wall. On the mouse click event one can use Josh's FindScriptedParent function, in FPSWeapon.lua, to identify whether an entity has the IsWall() function. If the function is present and returns nill then that PickInfo entity is allowed to be clicked (and thus a floor). Otherwise it's a wall. This same procedure can be used to instead give a script to each floor model, as hopefully there are less floors than walls created--thus requiring less time when designing a map. I'm not sure about the efficiency versus the other methods, but so far this works well for when the user clicks. Some code: -- Setup camera Script.cam = Camera:Create() -- position, rotation, etc function Script:UpdateWorld() local win = Window:GetCurrent() local pickRadius = 0.01 if win:MouseHit(2) then local pi = PickInfo() local mp = win:GetMousePosition() if (self.cam:Pick(mp.x, mp.y, pi, pickRadius, true)) then local inspect = self:FindScriptedParent(pi.entity, "IsWall") if inspect == nil then -- If it reaches this spot then the picked entity -- is not a wall, so it could be the floor. -- You could have a secondary inspection to determine if the -- user is clicking on a character or other type of model -- by using a similar procedure. -- Now you can use pi.position (or pi.position.x, pi.position.y, pi.position.z) -- to guide your characters to the clicked location. end end end end
  10. You could try using Time:GetCurrent() to deal with the specific amount of time. By the way, does pressing F11 drop your FPS that much? Setup: Script.timeStartandDuration = 0 Script.displayEnabled = false Use this when you want to begin the timer: self.timeStartandDuration = Time:GetCurrent() + 5000 -- 5 seconds in this case self.displayEnabled = true Use this where you update: if self.displayEnabled == true then if self.timeStartandDuration > Time:GetCurrent() then -- Draw stuff code here else self.displayEnabled = false end end I'm sure you can be far more elegant than me on the names of the variables. Hope that helps.
  11. Does anyone know a way to determine whether a user has clicked on the NavMesh? I'm trying to only allow clicks on the floors, which also means to exclude walls and other steep angled scenery, and I think that the good looking NavMesh of the map editor seems like the perfect thing to use for this task.
  12. I'm importing models from a pack from TheGameCreators and the extraction process in Leadwerks Model Editor is quite painful. There has to be a better way and one solution is to type in the sequences. ID, NAME, INIT_FRAME, END_FRAME 0, Idle, 0, 24 1, Walk, 25, 49 2, Run, 50, 74 Now, looking at the above example, the ID of the next sequence could be automatically assigned when the user presses enter in a "animation text box". I believe that typing the sequences would help save a lot of time and irritation. After saving the sequences, then it would be neat to have a list box with all of the animations (the current combo-box is limiting in how fast you can switch from one animation to another), when the user clicks on the name of the animation the model begins playing the sequence. This "animation" list could be in a tab next to the Hierarchy tab. Also, a play/pause button would help a lot.
  13. The fix. More info at http://www.leadwerks.com/werkspace/topic/10237-lighting-engine-distortingcrumpling-rigged-models/#entry75680
  14. I'm having a bit of a problem dealing with models. I'm not aware of the proper terminology, but I'm seeing these "lines" appear when I apply a material to an exported UU3D FBX model. Does anyone know how to fix this issue? The image below shows the problem when inside of Leadwerks engine.
×
×
  • Create New...