Jump to content

gordonramp

Members
  • Posts

    398
  • Joined

  • Last visited

Posts posted by gordonramp

  1. Works ok for me although the model was not in view and it took me a while to find it. Like Rick, I'm wondering about the exe. Looks an excellent model for a medieval magical world.

  2. Because right now, we do not have anyone else thats even willing to give us this kind of expertise, much less in a tutorial form.

    I agree (although Aggror is making an excellent effort) and I admire the goodness of Naughty's heart.

    However, his original request was/is to give our opinions on what we thought and I have honestly given mine, Lua would be great Naughty Alien but if Mack gets his way and the lesson is in BMax then I look forward that too.. :)

  3. Besides it should not make a difference what language he uses, since the theory and methods should apply to all.

    Then you won't mind converting it to BMax will you (also your language of choice)? :) No, I'm not demanding at all Mack.. Just hoping to save myself (and others) a whole lot of work and to be able to takle it in a language I can understand at least a little.

  4. Hi Naughty,

    I realise you are using BMax and that would be your language of choice for a lesson but BMax users are a small percentage of Leadwerks Users, so I think do it in Lua so that everyone can benefit from it because the Editor uses Lua and other languages are interpreted from there. :)

  5. It suddenly struck me, I havn't updated my drivers for a while so I went to Nvidia and did so. But the same problem persists.

    Because I am using a large terrain. (2048x2048) I thought it may be too much for the GPU and so was leaving stuff out. But the same problem occurs when I halve the size to 1024x1024 and place the same simple objects into the scene. :D

  6. example1.jpgexample2.jpg

     

    Here are three assets including the crawler character and a simple textured cube and the above zombie. Run in the Editor they have shadows but outside the Editor Run in the Lua Engine, there are no shadows.

  7. Aggror,

    If it helps, I use this method all the time but I save and read from a text file.

     

    --Record Scene4
    io.output(io.open("Txts/scene.txt","w"))
    io.write("01")
    io.close()

     

    This code will create a text file called scene.txt and write a line which says '01'. If the value changes it will overwrite the file, eg. '02'.

  8. Hi ZioRed,

    Thanks and when I do that the error of course disappears but not the object so I must have something amiss in the variable. I tried the below as well but the object does not toggle on and off.

    Perhaps it is not possible to hide an object when it is parented.

     

    local vwep = LoadMesh("abstract::object1.gmf")
    --inloop--------------------------------------
    if KeyHit(KEY_F5)==1 then
    if showthing==0 then
    local object=0.6
    vwep:SetParent(fw.main.camera,0)
    vwep:SetPosition(Vec3(-0.0*object,-0.01*object,0.45*object),0)
    showthing=1
    vwep:Show()
    else
    showthing=0
    vwep:Hide()
    end
    end

  9. This gives an error on the second toggle saying 'attempt to index global value 'vwep' a nill value'. It comes from the vwep:Hide() line. The object is appearing but still not disappearing. Can anyone see why?

     

    if KeyHit(KEY_F5)==1 then
    if showthing==0 then
    local object=0.6
    local vwep = LoadMesh("abstract::object1.gmf")
    vwep:SetParent(fw.main.camera,0)
    vwep:SetPosition(Vec3(-0.0*object,-0.01*object,0.45*object),0)
    vwep:Show()      
    showthing=1
    else
    vwep:Hide()
    showthing=0
    end
    end

  10. This is a little more tidy...loading the object once.

    But I haven't got the vwep:Hide() and vwep:Show() working..

     

    if KeyHit(KEY_F5)==1 then
    if showthing==0 then
    local object=0.6
    local vwep = LoadMesh("abstract::object1.gmf")
    vwep:SetParent(fw.main.camera,0)
    vwep:SetPosition(Vec3(-0.0*object,-0.01*object,0.45*object),0)      
    showthing=1
    else
    showthing=0
    end
    end

  11. Ahh, well I adapted this bit of code from the FPS gun script that comes with the SDK. I agree, I don't want to load the object twice but it seems to be the only way I can get it to show. I'll play around with your suggestions. I'm actually trying to show and hide object1.

  12. Hi,

    I'm hoping someone can help me with this..

    Basically, I want to be able to show and hide an object in front of the camera. It's actually showing the object fine with the keyhit but I'm unable to hide it again. The object is parented to the camera and so moves around nicely in full view. How can I hide, delete or shift the object from view. This code resides in the Main Loop of my program. Thanks.

     

    if KeyHit(KEY_F5)==1 then
    if showthing==0 then
    local object=0.6
    local vwep = LoadMesh("abstract::object1.gmf")
    LoadMesh("abstract::object1",vwep)
    vwep:SetParent(fw.main.camera,0)
    vwep:SetPosition(Vec3(-0.0*object,-0.01*object,0.45*object),0)      
    showthing=1
    else
    showthing=0
    end
    end

×
×
  • Create New...