Jump to content

AggrorJorn

Members
  • Posts

    4,816
  • Joined

  • Last visited

Everything posted by AggrorJorn

  1. 1: use a lower range value for the pointlight or local muzzleflash = CreatePointLight(1) 2: I don't know how to shoot either, but what I would do is stripping down the FPS controller script. Test it out every time you remove a line and see what happens. Thats the approach what I mostly use. Like for example: Do I need values with recoil or do I wan the gun to sway. Ofcourse you can add it back gain later. but for now try to do it without it.
  2. I'm working on my "picking up objects" code but I am facing a problem. I can pick up the object but the positioning of the object is not working correctly. The object is being placed by using the camera position plus 2 more in the z axis. However, since the axis of the camera doesn't rotate, the object is always placed in the wrong place: if pick.entity~=nil then pickedUpEntity = pick.entity pickedUpEntity:SetPosition(Vec3(camera.position.x+1,camera.position.y,camera.position.z+1)) end
  3. Thanks for the reply Macklebee. The path wasn't the problem since the scene gets loaded. I restarted my computer and afterwards the script worked as it should be.
  4. I am trying Lua outside the editor at the moment. When I load a terrain (sbx) I only get the models placed in the terrain, but not the ground or the skybox. I am using just the Loadscene command. scene = LoadScene("abstract::camerapath.sbx")
  5. What do you mean with 'linked'? Like when linked inside the editor (green line per index)? Because I haven't seen a command in the wiki that can do this by code. The joints are giving me a lot of trouble, so I am gonna try your way now. This is what I have in mind: (according to your way) place 3 boxes under each other each box is parented to the one above (if it exists) a loop checks for the distance between 2 boxes if distance is lower than specified in variable then add force downwards the loop resets the boxes to its previous position, resulting in being pushed away over and over again I think the adding of forces is going to work as I expect. however, I think that the resetting of the boxes original position is going to cause unwanted results. I'll place back when I have something.
  6. The wiki says this: BlitzMax: EntityParent:Int( entity:TEntity, parent:TEntity, global:Int = 1 ) I think you need to switch the main camera with the gun.
  7. I have seen this effect outside the editor too. a spotlight starts in different angle, but when I restart the script editor, everything is working normal again.
  8. The fps controller script uses this: vwep:SetParent(fw.main.camera,0)
  9. Class scripts are not my strongest point at the moment. If you want to retrieve model names or pivots you use the: Finchild()command. Gettin the name of an object, see this topic: http://leadwerks.com/werkspace/index.php?/topic/1098-get-the-name-of-a-thingoid/
  10. You can set friction really high if you want. Drag an oildraum in the scene and try to change it s friction. you can go really high. I agree with that. I think Lua is really good to understand, at least when the documentation is correct or present. And then there is this problem: http://leadwerks.com/werkspace/index.php?/topic/1582-proper-lua-syntax-highlighting/ I assume you have taken a look a the vehicle examples that come with the sdk? Glad that the LUG helped you out!
  11. have you tried something like self.tire? Also try to use higher values for friction. perhaps there is nothing happening because the friction value is too low.
  12. Can you make a good screenshot on how the propulsion looks? I can then better image what to do to replicate the effect with other techniques.
  13. I've noticed that a lot of commands that I am using in Lua script can be mixed with the ones from C++. Some times a command works and sometimes it doesn't. The weird thing is that the C++ commands often turn blue while the actual Lua command stays black . Place the following in your lua script editor and you'll see: --both commands work in the Lua script editor -- Lua command body:SetCollisionType(1,1) --C++ EntityType (body,1) --Lua command in combination with C++. Doesn't work ground:PaintEntity(material) --command that you should use, but does not turn blue ground:Paint(material)
  14. Which shader di you use? "abstract::mesh_diffuse_glow.frag" or "abstract::mesh_diffuse_bloom.frag". You could try to combine them with particles. And setting the particle size realy big?
  15. AggrorJorn

    door

    Here is an adjusted fpscontroller. It shows you text when you are near an object and no text when you are not. I am still truying to make lua script that you can add to objects. This way the text only opens when you for example have turned on an option for the lua model. and thanks for your comment on the video fpsICON.zip
  16. hmm Sounds more compicated to me. How do you see that going? Something like: The second box is being forced towards the position of the first box, while the first box is pushing the second box away from him? I think I'll try this wiki page first: http://leadwerks.com/wiki/index.php?title=CreateJointBall Also in to old forum I saw a topic where the same joint technique is used
  17. AggrorJorn

    door

    You can do this with a raytrace. I've tried to do this before by showing a hand icon on special objects, but I never got it working on purely the models I wanted it 2. place this in the main loop, before FW:Update. pick=CameraPick(camera,Vec3(GraphicsWidth()/2,GraphicsHeight()/2,2.0),0,0) if pick~=nil then repeat if pick.entity:GetClass()==ENTITY_MODEL then break end pick.entity=pick.entity.parent until pick.entity==nil if pick.entity~=nil then showText =1 end end and then before the flipp command SetBlend(1) if showText == 1 then DrawText("Press E to open door"GraphicsWidth()/2,GraphicsHeight()/2) end SetBlend(0) or instead of a raytrace you can use EntityDistance: if EntityDistance(fw.main.camera,door) <2 then --showText=1 end You can then either have code to rotate the door on it's Y axis or you play an animation.
  18. That should be enough to have the default lua menu appearing.
  19. It is working again in Chrome, IE8 and FF. Thanks
  20. good work Micheal! Al those models look awesome! what do you mean with: "Price of course" ?
  21. I am trying to create a rope. I have been experimenting for 2 days now, trying al kinds of values. But unfortunately no good results sofar. Any suggestion for a command that would help to stabalize the rope would be great. See the txt file for the entire code. --box1 box1Body = CreateBodyBox(1,1,1,box1) box1=CreateCube() box1:SetParent(box1Body,1) box1Body:SetPosition(Vec3(0,30,0)) box1Body:SetMass(0) --some variables firstBodyCreated = 0 LastBody = nil Vec3Pos = Vec3 (0,0,0) i = 0 --Create more bodies in a loop for i = 0, 5, i+1 do Vec3Pos = Vec3 (0,i*1.1,0) if firstBodyCreated == 0 then NewBody = CreateBodyCylinder(0.5,2.5,box1Body) firstBodyCreated= 1 else NewBody = CreateBodyCylinder(0.5,2.6,LastBody) end NewBody:SetMass(10) NewBody:SetCollisionType(1,1) NewBody:SetPosition(Vec3Pos, 0) SetBodyElasticity(NewBody,10) NewBody:SetFriction( 5, 5 ) if LastBody~=nil then NewJoint = CreateJointBall (NewBody, LastBody,Vec3 (1, 1, 1)) SetBallJointLimits (NewJoint, 100,100,100) end LastBody = NewBody end DebugPhysics(1) Collisions(1,1,1)
  22. The chat room hasn't been functioning for a while. - chat room doesn't load. - manual refresh for joined members. - messages are not send. http://leadwerks.com/werkspace/index.php?/topic/1445-chat-room-problem/
  23. Everybody believes this is the real footage, except for you. Why would Josh present fake footage at the GDC? He would scare of any to be investors. Also would his, as wel as the Leadwerks engine, reputation sink deeper then the Titanic. This scene keeps amazing me. Good texturing and the right lighting settings are really important here.
  24. I've noticed that a lot of commands that I am using in Lua script can be mixed with the ones from C++. Some times a command works and sometimes it doesn't. The weird thing is that the C++ commands often turn blue while the actual Lua command stays black . Is this because the commands from C++ are universal too whatever script editor you are using? Place the following in your lua script editor and you'll see: -- Lua command body:SetCollisionType(1,1) --C++ EntityType (body,1) -- Lua command body:SetMass(0.01) --C++ SetBodyMass(body, 0.01) --confusing: --Lua command in combination with C++ ground:PaintEntity(material) --command that you should use, but does not turn blue ground:Paint(material)
  25. Josh's status is set to: Josh is making trees draw faster. Today, 07:19 PM perhaps he also working to the collision now he is working with the trees
×
×
  • Create New...