Jump to content

dennis

Members
  • Posts

    469
  • Joined

  • Last visited

Posts posted by dennis

  1. I really had to, it is fully working now gheghe

    but:

    in the options.lua

    Script.player = nil --entity
    
    function Script:LoadData(data)
    
    postfx = data.postprocessing
    AA = data.antialias
    
    self.player.script:OptionsLoaded(self)
    end
    

     

    and inside fpsplayer:

    function Script:OptionsLoaded(options)
    
    System:Print(postfx)
    System:Print(AA)
    if postfx == 1 then
    self.camera:AddPostEffect("Shaders/PostEffects/EffectClass/08_PP_bloom+godrays.lua")
    elseif postfx == 0 then
    System:Print("post effects off")
    self.camera:ClearPostEffects()
    end
    self.camera:SetMultisampleMode(AA)
    end
    

     

    although the multisample mode has some work in progress

    but I will fix that

  2.  

    As I recall the entities need to have unique names and if you saved some entity in 1 map and want to load it's data in another I think you'd need to have that entity in the other map named exactly the same. So basically make a pivot named OptionsMenu in your other map and put the loading function that's required and set it up. It won't need to have all the functionality that your real OptionsMenu had in your other map, but it's just a placeholder pivot so you can load the data for it. I hope I'm understanding the issue.

     

    Do those scripts even exist on the site anymore? Can't seem to find them. I haven't looked at this in some time so wanted to refresh myself but can't find where it is.

     

     

    hi rick!

    thanks for the answer, the pivot is exactly named the same.

    the map which is used to save the data is called: Menu.map all main menu stuff is enlisted there.

    the flowgraph shows following:

     

    post-2125-0-18948800-1425574563_thumb.png

     

    the map where the data needs to be loaded into is called outside_real.map.

    the data gets triggered by an onsceneloaded.lua and has to be loaded for fpsplayer.lua

    (for the post effects which is a shader for the camera and also for multisamplemode)

     

    so overall:

    - data gets saved using optionsmenu inside menu.map

    - data has to be loaded for graphical purpose in outside_real

    - the loaded data is used by fpsplayer.lua

    - and gets triggered by onsceneloaded

     

    do I also need to post the .map files ?

     

    Cheers

  3. Hi!

     

    I'm using rick's SaveLoad.lua to save some basic options.

    I got the following error:

    77 : attempt to index local 'entity' (a nil value)
    The error occurs in the line 77 which represents:

    -- be sure to change it's name to what it is in the saved file
    entity:SetKeyValue("name", entityName)
    

    the pivot carry's the same name, the optionsmenu I used isn't in the map which I want to Load the data in.

    the saved values are:

    return {
    -- Table: {1}
    {
      ["OptionsMenu"]={2},
    },
    -- Table: {2}
    {
      ["antialias"]=4,
      ["postprocessing"]=1,
    },
    }
    

    and those I'd want to load in another map than I saved the values with.

     

    Thanks in common.

    cheers!

    Dennis

  4. what pick should I use then?

     

    the target is determined here:

     

    function Script:IsTargetInAttackRange()
    local pos = self.entity:GetPosition()
    local targetpos = self.target.entity:GetPosition()
    if math.abs(targetpos.y-pos.y)<self.attackRange then
     if pos:xz():DistanceToPoint(targetpos:xz())<self.attackRange then
      return true
     end
    end
    return false
    end
    

     

    and the attack is started here:

     

    elseif self.mode=="attack" then
     if self.attackbegan~=nil then
      if t-self.attackbegan>300 then
       self.attackbegan=nil
       self.target:Hurt(self.damage)
      end
     end
     local pos = self.entity:GetPosition()
     local targetpos = self.target.entity:GetPosition()
     local dx=targetpos.x-pos.x
     local dz=targetpos.z-pos.z
     self.entity:AlignToVector(-dx,0,-dz)
    end
    

     

    I tried to put the attack before "if self.attackbegin~=nil then"

  5. I purchase all my characters and none so far come with a climbing animation, so ladders are out for me. I can do most things in programming or art work but animating charscters is not one of them.

     

    3D models and tex (former dexsoft) is selling models with climbing animations ;) maybe something to check out. at least the new marine packs do so

  6. Hey guys,

     

    I'm designing a huge outside map, which kinda eed to have lower parts in the terrain where for example; rivers can be drawn.

    Is it possible to lower the terrain on several parts?

    in LE2 you had to use CTRL+mouse button. but how could this be done in LE3.X?

     

    Cheers guys!

    Thaks in common :D

×
×
  • Create New...