Jump to content

AggrorJorn

Members
  • Posts

    4,816
  • Joined

  • Last visited

Everything posted by AggrorJorn

  1. I am looking in to a good level switching system but my program keeps crashing. Am I forgetting something? I tried: ClearWorld(fw.main.world) as wel as: ClearWorld(fw.main) The debugger tells me at both times: Attempt to access field or method of Null object.
  2. I did not know that there was an invisible material! I thought you guys ment a black texture that then uses alpha rendering. this works great.
  3. Thanks for the link. But I think you have to run this command outside the script. When your data are static, then is possible compile file to binary format: luac -o game.data game.lua, but then you don't forget change filename in your code, when output filename isn't same. Besided LUAC is there another way to secure your save data?
  4. The code I posted works fine actually. The program stores the values and loads it back how I would expect it to be. The only problem is that anyone can open the lua file with an editor. Can I use some other kind of file to store my data in and secure this file so that no one can access it?
  5. Well I am looking into savegames and settings saving. At the moment I am writing my test variable value to the save.lua file. However, I don;t want people do change that lua file. That is why I want to convert it to luac. require("Scripts/constants/engine_const") --registering the abstract path RegisterAbstractPath("") --Set a graphics mode Graphics(800,600) --Framework object fw = CreateFramework() --set camera camera = fw.main.camera camera:SetPosition(Vec3(0,2,-10)) test = 1 --main function while KeyHit(KEY_ESCAPE)==0 do if KeyHit(KEY_1)==1 then test = 1 elseif KeyHit(KEY_2)==1 then test = 2 elseif KeyHit(KEY_3)==1 then test = 3 end --Open the save.lua file if KeyHit(KEY_O)==1 then dofile("abstract::save.lua") end --Write the test value in save.lua if KeyHit(KEY_S)==1 then file = io.open("save.lua","w") --Open in Write mode if file == nil then Notify("there is no file") end file:write("test = " .. test) file:close() end fw:Update() fw:Render() SetBlend(1) DrawText(" Use 1, 2 and 3 to set value",0,30) DrawText(" S = saving - O = open",0,60) DrawText(test,0,90) SetBlend(0) Flip(0) end
  6. Does abybody have experience in compiling a Lua script to a luac luac file? I found which explains it a little but the I only get errors. http://www.lua.org/manual/4.0/luac.html so far I have: file = io.open("save.lua","w") --Open in Write mode file:write("test") file:close() luac -o save.lua save.luac
  7. Thanks for your answers. It seems that using a simple show command for the children wont work. I will try the invisible material way. thanks.
  8. I have a mesh placeholder that I drag in my scene. The placeholder loads several other models that are parented to the main model. When I try to hide the main model it also hides it's children. function class:CreateObject(model) local object=self.super:CreateObject(model) self.modelA = LoadModel("abstract::modelA.gmf") self.modelA:SetParent(object.model) object.model:Hide() --self.modelA:Show() Does anybody know how to show a child while the parent remains hidden.
  9. A while ago it was mentioned in a topic that solids where exposed. Solids could be easily used as triggers instead of collision callback or CheckDistance. Is there an update on these solids? http://leadwerks.com/werkspace/index.php?/topic/1485-more-thingoids/page__st__20__p__16171__hl__triggers__fromsearch__1entry16171
  10. I voted: Entity turns +1 then -1 (no net change) It seems the most logical. When you have a gamescript like this it will also follow be the same: entity:Move( Vec3(0,3,0)) entity:Move( Vec3(0,-3,0))
  11. this looks really promising. I especially like the prefabs and the script attachment. What kind of term do we have think about? a year from now or longer/sooner?
  12. AggrorJorn

    Zero Hour

    yey !! Very cool. I will make a request at once.
  13. I have added the pdf file to the resource page. Check out some of the excersises. They are pretty cool. http://leadwerks.com/werkspace/index.php?/page/resources?record=28 The video tutorial has been uploaded to Youtube and exists out of 3 parts.
  14. I am looking into this. I deffinetly need this for making triggers/events and I am deffinetly not going to use entityDistance for this. It makes it cheap and unprofessional. According to Josh, the collision callback should be working though. I will let you know if I find anything on that. However the tutorial for triggers and events will really need this to work. @Flexman. Yes joints and stuff will cover an entire tutorial, but since I am struggling with that myself I can't really make anything. Thanks for all the kind comments!
  15. http://leadwerks.com/werkspace/index.php?/page/resources?record=28 This video tutorial explains how to create bodies in your Lua program. The tutorial will explain the following: - Physics inside the editor. - Creating bodies. - Collisions and Collision types. - For loop. - Arrays. - Setting gravity. Youtube upload has to wait since I need to cut the video in three parts first. Have fun!!
  16. Thanks for the good answer. +1
  17. Do your models already have phy files before you open the editor? If no, then that ight explain the problem. It is possible that when you have no phy file made, that the editor automaticly makes one for you as soon as you put your model in to a scene. Maybe they only start to take effect ones you have tried out the scene first.
  18. I think when you want to render picture to picture, you render the scene to a buffer and paste this on a 2 surface created by hand. As for the extra window: I think this might be a problem with the EULA. Since you are not 'entirely' allowed to mkae your own editor/program with it. I have read something about that.
  19. I haven't tried animated material yet, but this might be a way to slip around it. Create a plane mesh that represents the water. Make a simple movie of streaming water (topview) Use Niosop's video tingoind to place the video on the entire waterfall mesh add some particles for extra effect haven't tried this yet.
  20. Thats is a good suggestion. I would place this in the feature requests. I am often testing stuff in the editor as wel outside the editor and it costs a lot of time switching and copying models from one place to another.
  21. This morning I ahve been machetting my way through wikipedia to learn more about the different kind of frictions. I know that LE has 2 types of friction: static and kinetic. But going over the commands in wiki from LE, I also see the term 'damping'. the program samples included for setting friction and damping result in the same outcome. My question is: What is the difference between damping and friction?
  22. When I try to create a new graphics window while my first program is running, the first programm closes down. So I don't know if this is possible.
  23. When you use the editor, you are already using framewerk. The viewport where you look through to see your scene uses fw.main.camera. When you look at the fpscontroller scipts you will notice that there is no framewerk being created although the script uses the variable 'fw'.
  24. Hi elmar, what do you mean with second window? Like a submenu in your game or do you mean a second graphics window?
  25. Elmar, 1) Make a scene in the editor with just some terrain and a few oilbarrels in it. 2) Make a program from scratch that loads your scene correctly. 3) Add some movement via a character controller. 4) Use the code that Ziored proposed, and place it in the main loop. 5) Every time you are near an object and you click on it, it turns red.
×
×
  • Create New...