Jump to content

AggrorJorn

Members
  • Posts

    4,816
  • Joined

  • Last visited

Everything posted by AggrorJorn

  1. Thanks for the comments - I don't buy models from Dexsoft so I wouldn't know how this works. Maybe someone else has experience with this. This can be added later though because there a lot of people who buy these assets. - I can't program, I just try some code and see if it works. Although I understand LUA a bit better then C++, I sometimes don't know exactly how commando's work. However, when Josh makes some new tutorials I might get better at it. I think I'll make a separate Lua user Guide for this. - I'm trying to make this User guide at a way so that every one can work with the engine. It doesn't mater whether you can program, model, animate or texture. When there are chapters that are unclear to users they can report that and I'll make some adjustments. B)
  2. I find my stuff here: http://www.freesound.org/
  3. I'm putting together a Leadwerks 2.3 User Guide. It has all the basic functions inside and outside the editor explained. I Download the LUG here. Current version: 1.01 106 pages of useful information that helps you getting around with the Leadwerks engine 2.3. This user guide is ideal for beginners but can also be used by advanced members as a reference guide. *new in version 1.01 fixed several typos fixed incorrect explanations updating the light and shadow options (Leadwerks 2.31) Camera path road node corona edit menu better mat file explanation Explanation about shaders shader usage Things that need to be added in LUG: sounds ini file and lua representative
  4. Leadwerks ghost strikes again..
  5. Did you give it a try before you call : fw:Render()
  6. Did you try the thing Rick said? with creating a new controller since the old one gets removed?
  7. You can't be far from it. Neither am I, I think. Could you past the code you have where you can switch the scene, but where the control fail?
  8. You can also change this via tools-link index.
  9. welcome to the community! Your art and models look very good. How many polys is the alien soldier?
  10. try using this: if KeyHit(KEY_1)==1 then FreeWorld(fw.main.world) scene=LoadScene("Maps/1.sbx") end if KeyHit(KEY_2)==1 then FreeWorld(fw.main.world) scene=LoadScene("Maps/2.sbx") end
  11. I'll give this a try myself. I need to find out how to do this as well in lua.
  12. I had the same problem a while ago. The level loading worked good but the character controls seemed all to stop working. instead of freeing the entire world you can make every object member of group. The character controls are then defined outside the group and wont be removed. scene = LoadScene(test.sbx) group1=CreateGroup() SetEntityGroup(scene,group1) I don't know if this code works with LUA, I can't find it directly.
  13. This looks amazing. The video is addepting itself perfectly against the models meshes and the color editing works great. well done Niosop
  14. that would probably be better. When I'm more pro with coding I'll try that. for now I'll just stick with this. +1 for U.
  15. briljant this works! It's not entirely perfect as the position sometimes changes when I go back from game mode to editor mode. However, I can just drag the candle inscreen when I'm done editing the level. here is the code I use and a screenie. function class:CreateObject(model) local object=self.super:CreateObject(model) --position candle at the camera object.model:SetPosition(fw.main.camera:GetPosition(1)) object.model:SetParent(fw.main.camera,0) object.model:SetPosition(Vec3(0.5,-0.5,1.35),0) The flame isn't final yet. It looks more like a stick of dynamite....
  16. Rick gave me the following advice via the chat: the lua scripts won't run if you load the object. the engine and editor has code in it to make the lua scripts run you should be able to place the candle in the scene still and when you run your game, move it to the fw.camera location and offset it slightly in front to give the same effect so in the candle lua file you can position the model relative to the camera
  17. require("scripts/class") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) --Create light object.light=CreatePointLight(4,model) object.light:SetColorf(1,0.6,0.25,1,1) object.light:SetPositionf(0,1.2,0,0) object.light:SetShadowOffset(0,0.91,0) object.fire=CreateEmitter(100,100,Vec3(0,1,0),0,object.model) object.fire:SetPositionf(0,0.5,0,0) object.fire:Paint(LoadMaterial('abstract::candleflame.mat'),0) object.fire:SetRadius(0.02,0.02) object.fire:SetColorf(0.2,0.2,0.2,1,1) object.fire:SetWaver(0) object.fire:SetVelocity(Vec3(0,0.01,0),Vec3(0,0.01,0)) --Declare initial values object.fluctuation=1.0 object.smoothedfluctuation=1.0 function object:SetKey(key,value) if key=="color" then elseif key=="intensity" then else return self.super:SetKey(key,value) end return 1 end function object:GetKey(key,value) if key=="color" then elseif key=="intensity" then else return self.super:GetKey(key,value) end return value end function object:Render() self.fluctuation=self.fluctuation+math.random(-100,100)/1000.0*AppSpeed() self.fluctuation=math.min(1.0,self.fluctuation) self.fluctuation=math.max(0.2,self.fluctuation) self.smoothedfluctuation=Curve(self.fluctuation,self.smoothedfluctuation,5.0/AppSpeed()) self.light:SetColorf(1.0*self.smoothedfluctuation,0.6*self.smoothedfluctuation,0.25*self.smoothedfluctuation,1,0) end end
  18. The titel might be a bit unclear but I couldn't think of anything else. I have a candle model which you can drag into the scene. Via the attached lua file I load the particles that are used to show a small flame on top of the candle. If I drag the candle in the editor everything works fine. In the fpscontroller script I load this model like the gun. The candle loads and positions itself fine, but the particles that create the light don't. It is like the lua file for the candle is not being used. Is it even possible to load a model via script and that the attached script runs with it? This is the script (before the loop): --candle candle = LoadMesh("abstract::candle.gmf",vwep) candle:SetParent(fw.main.camera,0) candle:SetPosition(Vec3(0.5,-0.5,1.35),0)
  19. Thats what I thought at first. But when you open the drawers in the model viewer, you can see that the pivot point of the drawers lies in the back. I don't know why exactly but when you drag the drawers in the editor, the pivot point is indeed with the correct ofsett.
  20. I'm a bit puzzeled with the lua code at the moment. I'm wondering how the drawers are positioned. I can't see any bones or pivots inside the desk mesh and neither do I see the code that positions the drawers at a pivot. I have to be totally blind here or I'missing something completely.
  21. briljant! Thanks for your help! +1
  22. Thanks Niosop, that worked. function object:Init() self.pos=self.model:FindChild("slingerpoint"):GetPosition(1) self.slinger=LoadModel("abstract::matt_woonkamer_slingerklok_slinger.gmf") self.slinger:SetPosition( self.pos ) end Do you also perhaps know which command to use, so that the position of the slinger gets updated when I move the main object?
  23. I'm trying to load a model that should be positioned at a bone called 'slingerpoint' Can someone tell me what I need to change to get this to work? function object:Init() self.slinger=LoadModel("abstract::slinger.gmf") self.pos=self.model:FindChild("slingerpoint") self.slinger:SetPosition(self.pos) end
  24. picking up objects: Stuff like this is certainly possible. You need a littlle programming experience to do this or you can ask at the programmers section of the forum. I shouldn't be to hard to create this. using a switch: kinda the same like above. The engine comes with a few examples scenes. one of the scene is a tunnel scene where there is switch. this switch can be used to turn on and of a rotating fan. For a light to go on and off you can use the same functionality.
  25. Perhaps it won't open because the joint from the locker is created at the Y axis. Try using self.joint = CreateJointHinge( self.model, self.door,self.door:GetPosition(1), Vec3(0,0,1) ) or self.joint = CreateJointHinge( self.model, self.door,self.door:GetPosition(1), Vec3(1,0,0) ) instead of self.joint = CreateJointHinge( self.model, self.door,self.door:GetPosition(1), Vec3(0,1,0) )
×
×
  • Create New...