Jump to content

gordonramp

Members
  • Posts

    398
  • Joined

  • Last visited

Everything posted by gordonramp

  1. It looks excellent but at that price.. I don't think there would be many takers.
  2. Ok, I'll explore this... Update: Success.. require("scripts/class") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) function object:Update() if EntityDistance(fw.main.camera, self.model) < 10 then PointEntity(self.model, fw.main.camera, 3, 0.01) end end end Thanks
  3. Yes, 'metal01_1 is the name of the door that comes with the LE. I've tried it in both the Game Loop and now in the class file.
  4. Cassius, if EntityDistance(controller, metal01_1) < 5 then PointEntity(controller, metal01_1, 3, 0.01) end Same result.
  5. Your right, it runs without an error now (C++ coder), however the object does not turn to face the camera as requested. Maybe someone has a simple working example of 'trigger code' to share.
  6. Ok, I thought I would have a go at using 'EntityDistance'. Using Lumooja's pseudocode as a base.. I placed a metal door on a terrain in the editor. Then using the basic fps Lua code, put this in the main loop.. If(EntityDistance(fw.main.camera,metal01_1)<5) then PointEntity(fw.main.camera,metal01_1,3,0.01) end I gives me this error.. 'unexpected symbol near 'then'' I guess it's a simple Lua code error, any ideas why that might be?
  7. I am looking at the idea of 'triggers'( initiating an event) but have no idea where to start. I assume some sort of collision code would be necessary followed by a pointing at the event. Like, the recording of 'Health'. I can't seem to find anything much about this on the Lua Forum. Any ideas?
  8. I'm using Fliphook. if KeyHit(KEY_K)==1 then AddHook("Flip",DrawOverlay) end I can turn it on using this and I'm wanting to toggle it on and off.
  9. I've used LoadTexture() and DrawImage() to get an image to the screen. But I want to toggle it on and off. I can't find a FreeImage() command so what can I use to hide or delete the image? Thanks.
  10. Finally I got this sorted. This class file will point a stationary character at the camera. ------------------------------------------- require("scripts/class") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) function object:Update() self.model:Point(fw.main.camera, 3, 1, 0) end end -------------------------------------------
  11. What do you mean, usually you add collision through the Engine. If you are using the Leadwerks Engine then through the Editor, in the the 'properties' of the object you have made in 3dws and converted to .gmf.
  12. Thanks, I'll give it a try. Update: It can't be something as simple as placing PointEntity(character,fw.main.camera, 3, 1, 0) in the class file because I get an 'Access Violation' error.
  13. Well I found this command and it looks like it will do what I want which is to have an object face the camera when I'm moving around in fp mode. Say, a character watching you. Something like... PointEntity(character, camera, 3, 1, 0) The thing is, I'm not sure how to go about setting this up. Do I place the code in the Character's class file, or in the fp main loop?
  14. Well I tried the abstract:: route but that didn't help so I think it is something more fundamental.
  15. Yes, a lot of fundamental changes were made to LE.2.3 after this was posted. It seems to be broken.
  16. VicToMeyeZR, I'm not sure why you pointed out that piece of code but it could be useful to click on an object in a 3D scene. This is something I have been trying to figure out how to do. if MouseHit(1) == 1 then if MouseX() > object.location.x and MouseX() < object.location.x + object.size.x and MouseY() > object.location.y and MouseY() < object.location.y + object.size.y then object.color = Vec4(0, 1, 0, 1) end end The question is.. how can I adapt this to click on an object in a 3D scene so that an event can take place? It has x and y reference for the mouse but no z. Could it be something like.. if MouseHit(1) == 1 then if MouseX() > object.location.x and MouseX() < object.location.x + object.size.x and MouseY() > object.location.y and MouseY() < object.location.y + object.size.y and MouseZ() > object.location.z and MouseZ() < object.location.z + object.size.z then object.color = Vec4(0, 1, 0, 1) end end But if that would work, how could I relate it to a particular object in the scene?
  17. Using the 'Pi-Main object', I can move the Textbox to a position on the screen in the Object Properties and when I run the program I can click on the object and it will turn green. Is that it , do I just put text over the top of it, or is it for input output?
  18. Had a go at this and the text box appears in the Editor but when I run the program it doesn't appear.
  19. Well if you need some tips on animation or art pipeline for the Leadwerks Engine, just ask. Also, if you get lipsync working in the Engine, I would have some paid work available if you wanted it.
  20. This looks useful, but is this working code and how would I go about turning it into an object that could be dragged into a scene?
  21. That looks like lipsync, have you managed to get it working in the Leadwerks Engine?
  22. Nice work Kevin Tillman.. in Max too.
  23. Yes, and it's no shame to copy and paste in order get something working. Like an artist who uses recycled materials to produce great works of art. It's just a way of accomplishing an end. Also some Language producers encourage copy and paste. The Gamecreators are in this category. They have a Snippets Forum, a Code Base and a Newcomers Corner. They understand how important it is to get people into their world and way of thinking. I remember laughing when I bought Dark Basic Classic and some example games accompanied it with the suggestion that they be hacked and torn apart so that purchasers could get the hang of how to do things. I think that was a great attitude.
×
×
  • Create New...