Jump to content

lxFirebal69xl

Members
  • Posts

    333
  • Joined

  • Last visited

Posts posted by lxFirebal69xl

  1. I have this problem again, as soon as I click the "New" button, I get that message, and if I try to load a level I get that message as well, if I load backup number 46 or before of that map it works, but anything from that point on(47 to 62) crashes the engine.

     

    I could rebuild everything I did again, but it's like 5 hours of work, I don't really want to go back and do it all over again.

  2. A long time ago I had this problem with text overlapping itself when you used some entities in the game, then Rick (thanks by the way) came along and fixed this issue. This is the code right now:

     

    Inside FPSPlayer.lua right below the default variables:

     

    Script.DisplayTimeMax = 4000
    local font1 = Font:Load("Fonts/MODERN SERIF ERODED.ttf", 20)
    

     

    In the Start():

     

    self.text = ""
    

     

    Inside the UpdateWorld()

     

    if pickInfo.entity ~= nil then
      if pickInfo.entity.script ~= nil then
      if pickInfo.entity.script.GetText ~= nil then
       self.text = pickInfo.entity.script:GetText()
       self.DisplayTime = Time:GetCurrent() + self.DisplayTimeMax
      end
     end
       end
    

     

    Under PostRender(context)

     

    if self.text ~= "" then
       context:SetBlendMode(Blend.Alpha)
       context:SetFont(font1)
    
       if self.DisplayTime > Time:GetCurrent() then
     context:SetColor(255,255,255)
     context:DrawText(self.text, 100, 600)
       else
     -- reset
     self.text = ""
       end
      end
    

     

    This is all that was required (back in 2015) to set up the player script, then we had this simple code for the entities:

     

    Script.ObjectDescription = "" --string "Object Description"
    function Script:GetText()
    return self.ObjectDescription
    end
    function Script:Disable()--in
    self.enabled=false
    end
    

     

    Now the only problem here is that the hand icon doesn't actually show up, so the player can't interact with it, I tried doing a Use(context) function that called the self.GetText() but that just caused the game to exit out with an error saying:

    Script Error
    attempt to index local 'self' (a nil value)
    Line 8
    

     

     

    So any thoughts as to how I would resolve this issue?

  3. Have you tried the Steam option to verify the integrity of Leadwerks?

    Wont fix the "New" button problem but have you tried opening any of the backups in the Backup directory? On windows it's in C:/Users/Username/Documents/Leadwerks/Backup directory.

     

    Found the issue, and it's a pretty dumb one.

    I had an "event" in that level where a monster went to a waypoint after a specific x amount of time, the thing is, I must have deleted that pivot by accident and that's what was causing the editor to crash.

    I thought it was something a lot more serious and now I feel dumb.

    GG.

  4. Alright, I was working on a level today, I made all my changes to it and was happy with the results, so I saved, and started working on another one. Then when I tried to load the level I was working on before I get this:

     

    post-13811-0-74959100-1456173112_thumb.png

     

    This is really bad because I've been working on that level for months now, I really can't allow it to just give up on me.

     

    The red text on the console says:

    Error: script connection target entity not found.

    Error: script connection target entity not found.

     

    Here's what I've done so far that hasn't fixed the issue:

    -Re-launched Leadwerks.

    -Made another project, copied over the files and tried to load the level there.

    -Published a stand alone and tried it, whenever it starts to load that level it crashes.

    -Opted in to the latest beta, tried to load it again, no dice.

     

    In my understanding, this should give an error when you try to play the level, not load it in the editor.

     

    Any thoughts on this?

  5. mhh. thats odd. I am 99% sure i fixed that once. Seems that an old version is up on the steam workshop again. :/

     

    sorry for the late response. Was and still am ill laying in the bed. :/

     

     

    For the time being here is the current script. (the text.lua files need to look a bit different in this so the fix works. But there is an example text.lua file included)

     

    https://cloud.software-sl.de/index.php/s/sHbt6kKfMT926zi

     

    Will see to upload that version again to the steam workshop.

     

    //Edit: doesnt let me upload to steam workshop again. :/ i start to hate steam...

    One hack is to add a commented-out line in any script that has the file name in it:

    --"myfile.mat"

     

    Does this work with tex files? Like:

    --"mytex.tex"

  6. I'm currently having the same problem, I can run the game fine in the editor.

    But if I publish it stand alone or game launcher it won't launch, the only fix I found (for me at least) was to copy over the "Materials" folder to the published game directory.

  7. The first one is tricky, but the second can be done fairly easily. I don't have access to Leadwerks right now, so I can't code anything that works, but I can try to explain it.

    1. Get your local forward movement direction, including the y axis

    2. Set y to 0

    3. Normalizeyour movement vector

    4. Multiply the vector by your movement speed

    5. Apply the movement

     

    If you don't understand what I'm trying to explain, just let me know and I'll whip up the code in about 8 or so hours.

     

    Just tried to do this myself but I keep messing up somewhere, could you show us an example of something simple?

  8. Alright so let me explain myself a bit here, you know how in games you have those options that define how much gamma there is and whatnot? I was wondering how to do that and how to keep it persistent through all the levels the user has created.

     

    An example of this would be to manipulate say the Bloom shader, by having an option to toggle it on or off an keep it saved.

    I'm not asking anyone to code anything for me, but instead to guide me in the right direction.

  9. Here are a few things I noticed while trying to publish a demo using Lex.

     

    1) The standalone version has a problem with the "Materials" folder inside the data.zip, trying to launch the game without having the "Materials" folder from leadwerks in the game's directory makes it crash on start up.

     

    2) Something is off with the loading of the maps, in the editor I could load a map just fine but if the game is published as soon as the "Changemap" script is called the game crashed without any warnings.

     

    3) A published game doesn't run without the "ClientScheme" file, this is to be expect but the problem is, Leadwerks doesn't export that file when you publish a game.

     

    4) In a published game, the loading screen doesn't change from the default, even if you changed it in the "Main.lua" script.

     

    Hopefully I've been of some help :P

  10. I was working on an update for the demo of "A Demon's Game", I got reepblue's LEX integrated and started using his ChangeLevel script that came with the template to change the level in the game's demo.

    However, everytime I tried to change the map, it just gives me an error on the console.

    Failed to read file "C:/Users/Ruben/Documents/Leadwerks/Projects/ADemonsGame/Sewers_2.map".
    

     

    If I try to use the script that comes with leadwerks, this error pops up.

     

    "C:/Users/Ruben/Documents/Leadwerks/Projects/ADemonsGame/scripts/objects/triggers/triggerchangemap.lua" : 10 : attempt to call method 'changeMap' (a nil value)
    

     

    This only started happening recently, so I really don't know what could be causing it.

     

    I have attached all 3 scripts that were used.

     

    Main.lua

     

    ChangeMap.lua

     

    CollisionTrigger.lua

×
×
  • Create New...